Copyright: Copyright (c) 1996-97 ProtoView Development Corp.


Contents
 ProtoView WinX Reference Guide

	Introduction Introduction to the WinX Component Library.  Instructions on how to install the product and get support are listed.
	Getting Started with WinX This section provides several step-by-step tutorials for learning how to use the WinX ActiveX controls.  Users should also refer to the samples provided with the WinX software.  These samples are installed when you install WinX from floppy disk or CD.
	Programming Reference A complete reference to all 17 WinX controls. Events, properties and methods are categorized.


 Programming Reference

 Data Binding

 ProtoView Button Control

 ProtoView Calendar Control

 ProtoView Currency Control

 ProtoView Date Edit Control

 ProtoView Dial Control

 ProtoView Font Selection Control

 ProtoView Line3D Control

 ProtoView Marquee Control

 ProtoView MaskEdit Control

 ProtoView Multidirectional Button Control

 ProtoView Numeric Edit Control

 ProtoView Picture

 ProtoView Progress Bar Control

 ProtoView Shape3D Control

 ProtoView Text3D Control

 ProtoView Time Edit Control

 ProtoView TreeView Control


 Complete List of Interfaces

 Data Binding

ProtoView Button Control

Button Properties

BackColor

Caption

ColorCodeColor

CustomPicture

DarkHighlight

DarkShadow

DefaultButton

Enabled

Font

ForeColor

hWnd

LightHighlight

LightShadow

Picture

RepeatButton

SpecialEffect

Button Methods

AboutBox

ResetColorScheme

SetRedraw

Button Events

Click

KeyDown

KeyPress

KeyUp

MouseDown

MouseUp

ProtoView Calendar Control

Calendar Properties

Appearance

AutoSizeFont

BackColor

BkDayColor

BkHighlightColor

BorderStyle

DayColor

Enabled

EnablePeriodEdit

EnableYearEdit

Font

ForeColor

Format

HighlightColor

hWnd

ReadOnly

SundayBkColor

SundayColor

Value

Calendar Methods

AboutBox

Calendar Events

Change

Click

DblClick

KeyDown

KeyPress

KeyUp

MouseDown

MouseMove

MouseUp

ProtoView Currency Control

Currency Properties

Alignment

Autoscroll

CanUndo

CopyToClipboard

DecimalPlaces

DecimalSeparator

DisplayFormat

EditMode

EditModeChange

Format

FormatNegative

FormatPositive

HighlightColor

HighlightInverted

LimitValue

Modified

ReadOnly

SelectionPersistance

SuppressThousand

Symbol

Text

TextDisabled

Value

ValueMax

ValueMin

ValueReal

Currency Methods

AboutBox

Undo

Currency Events

Click

GotFocusEvent

KeyDown

KeyPress

KeyUp

LostFocusEvent

MouseDown

MouseUp

ProtoView Date Edit Control

Date Edit Properties

Alignment

BackColor

Border

CalendarDOWs

CalendarFormat

CalendarMonths

DateFormat

DateString

Day

DayOfWeek

DayOfYear

DisabledColor

DisplayFormat

EditMode

EditModeChange

Enabled

Font

ForeColor

HighlightColor

HighlightInverted

Modified

Month

NullString

Separator

SeparatorDefault

Status

TimeStore

Value

ValueReset

WeekOfYear

Year

Date Edit Methods

AboutBox

SetSelection

Date Edit Events

AfterCloseCalendar

BeforeLostFocus

BeforeOpenCalendar

Change

Click

DblClick

GotFocusEvent

KeyDown

KeyPress

KeyUp

LostFocusEvent

MouseDown

MouseMove

MouseUp

ProtoView Dial Control

Dial Properties

Direction

Enabled

hWnd

MaximumRange

MaximumTurnRange

MinimumRange

MinimumTurnRange

Value

Dial Methods

AboutBox

Dial Events

Click

DblClick

EndScroll

KeyDown

KeyPress

KeyUp

LineDown

LineUp

MouseDown

MouseMove

MouseUp

PageDown

PageUp

ThumbPosition

ThumbTrack

ProtoView Font Selection Control

Font Selection Properties

Appearance

BorderStyle

Enabled

Font

hWnd

Font Selection Methods

AboutBox

GetFontHeight

GetFontName

GetPointSize

SetFontHeight

SetItemHeight

SetFontName

SetPointSize

Font Selection Events

Click

FontNameChange

KeyDown

KeyPress

KeyUp

MouseDown

MouseMove

MouseUp

PointSizeChange

ProtoView Line3D Control

Line3D Properties

ForeColor

LineStyle

LineWidth

LineOrientation

ShadowColor

ShadowHorizontal

ShadowVertical

WidthToRectShape

Line3D Methods

AboutBox

Line3D Events

ProtoView Marquee Control

Displaying Images

Marquee Properties

BackColor

Direction

Font

ForeColor

Frame

FreezeMarquee

Heading1 - 5

hWnd

Justification

NextDisplayString

Picture1 - 9

Redraw

Text

TickIncrement

TickTime

Marquee Methods

AboutBox

Marquee Events

Click

DblClick

FinishedDisplay

MouseDown

MouseMove

MouseUp

ProtoView MaskEdit Control

MaskEdit Properties

Alignment

Autoscroll

BorderStyle

CanUndo

CopyEmptyMask

CopyTextAndMask

DisplayFormat

EditMode

EditModeChange

HighlightColor

HighlightInverted

Mask

Modified

PromptCharacter

ReadOnly

SelectionPersistance

Text

TextDisabled

TextWithMask

MaskEdit Methods

AboutBox

SetSelection

Undo

MaskEdit Events

Click

GotFocusEvent

KeyDown

KeyPress

KeyUp

LostFocusEvent

MouseDown

MouseUp

ProtoView Multidirectional Button Control

Multidirectional Button Properties

Appearance

BorderStyle

Enabled

hWnd

Multidirectional Button Methods

AboutBox

Multidirectional Button Events

Click

DblClick

Down

KeyDown

KeyPress

KeyUp

Left

MouseDown

MouseMove

MouseUp

Right

Up

ProtoView Numeric Edit Control

Numeric Edit Properties

Alignment

AutoReformat

Autoscroll

CanUndo

DecimalDefault

DecimalMax

DecimalMin

DecimalSeparator

DisplayFormat

EditMode

EditModeChange

Format

FreeFormEntry

HighlightColor

HighlightInverted

LimitValue

LimitValueByType

Modified

ReadOnly

SelectionPersistance

SpinButtons

SuppressThousand

Text

TextDisabled

ValueCurrency

ValueInteger

ValueMax

ValueMin

ValueReal

ValueSpinDelta

Numeric Edit Methods

AboutBox

Undo

Numeric Edit Events

Click

Decrement

GotFocusEvent

Increment

KeyDown

KeyPress

KeyUp

LostFocusEvent

MouseDown

MouseUp

ProtoView Picture

Picture Properties

BackColor

BevelFaceColor

BevelHighlightColor

BevelShadowColor

Font

ForeColor

HorizontalJustification

hWnd

InnerBevel

InnerBevelWidth

InterBevelWidth

OuterBevel

OuterBevelWidth

Picture

PictureHorizontalJustification

PictureVerticalJustification

Redraw

StretchImage

Text

VerticalJustification

Picture Methods

AboutBox

BrowseForPicture

LoadPicture

Picture Events

Click

DblClick

MouseDown

MouseMove

MouseDown

MouseMove

ProtoView Progress Bar Control

Progress Bar Properties

Appearance

BackColor

BorderStyle

Enabled

FillColor

Font

ForeColor

hWnd

Limit

ShowNumbers

ShowPercentComplete

ShowTickMarks

Value

Progress Bar Methods

AboutBox

Progress Bar Events

ProtoView Shape3D Control

Shape3D Properties

BackColor

LineColor

LineWidth

RotateSide

ShadowColor

ShadowHorizontal

ShadowVertical

Shape

ShiftShapeLeft

ShiftShapeUp

Symmetrical

Transparent

Shape3D Methods

AboutBox

Shape3D Events

ProtoView Text3D Control

Text3D Properties

Alignment

BackColor

Font

ForeColor

FrameColor

FrameShadow

FrameStyle

HighlightColor

OffsetHorizontal

OffsetVertical

ShadowColor

Text (Default)

TextOnFrame

TextStyle

Transparent

Text3D Methods

AboutBox

Text3D Events

MouseDown

MouseUp

ProtoView Time Edit Control

Time Edit Properties

AMString

Appearance

BackColor

BorderStyle

DisplayStyle

Enabled

Font

ForeColor

Hour

hWnd

LeadZero

Minute

NoHideSel

PMString

ReadOnly

Second

SeparatorCharacter

ShowSeconds

Time

TwentyFourHourClock

UseDefaultFormat

Time Edit Methods

AboutBox

StartClock

StopClock

Time Edit Events

BeforeChange

Change

Click

KeyDown

KeyPress

KeyUp

MouseDown

MouseMove

MouseUp

ProtoView TreeView Control

TreeView Properties

AllowInPlaceEdit

AlwaysShowSelection

Appearance

AutoOpen

BackColor

BorderStyle

Branches

ColumnWidth

Count

CustomDefaultPicture

CustomLevelPicture

Enabled

EnableBitmaps

EnableLines

EnableMicroBitmaps

EnableToolTips

Font

ForeColor

HorizontalExtent

hWnd

Indent

IntegralHeight

LineColor

MultiColumn

MultiColumnStyle

NumberOfColumns

ProportionalScrollBars

SelectedTextBackColor

SelectedTextForeColor

SelectMode

Sort

StandardDefaultPicture

StandardLevelPicture

TabPoint

TabPointCount

ToolTipBackColor

UseStateBitmaps

UseTabStops

VisibleCount

TreeView Methods

AboutBox

BeginInPlaceEdit

ClearTabStops

EndInPlaceEdit

Find

GetEditHWND

HitTest

TreeView Events

AfterCollapse

AfterDBAddNode

AfterExpand

AfterSelChange

BeforeCollapse

BeforeDBAddNode

BeforeExpand

BeforeSelChange

DeleteItem

InPlaceEditBegin

InPlaceEditEnd

KeyDown

KeyPress

KeyUp

LButtonDblClick

LButtonDown

LButtonUp

RButtonDblClick

RButtonDown

RButtonUp

TreeView Branch Properties

CustomItemPicture

Data

IsOpen

Level

StandardItemPicture

Text

TreeView Branch Methods

Add

Clear

Close

Get

GetHandle

IsLocked

IsMainBranch

IsValid

Lock

Open

Remove

Select

Unlock

Common Properties, Methods and Events

Common Properties

Appearance

BackColor

BorderStyle

Enabled

Font

ForeColor

hWnd

Notes about Colors

Common Methods

AboutBox

Common Events

Click

DblClick

GotFocusEvent

KeyDown

KeyPress

KeyUp

LostFocusEvent

MouseDown

MouseMove

MouseUp


 Introduction

 License Agreement

 What is WinX

 What is New in WinX 2.0

 Installing WinX

 Data Binding

 Product Support

 WinX File Listing


 Getting Started With WinX

 Visual Basic Tutorial

 Visual C++ Tutorial

 Data Binding


What's New in WinX 2.0

All WinX components are apartment model threaded for enhanced web browser support.

Database binding has been enhanced in existing components, and added to the TreeView, Picture and Marquee control.

The TreeView supports tool tips, meaning that items which are hidden or clipped by the size of the control can be displayed in the their full text when the mouse moves over them.

Mask and Date control can have their selection areas set programmatically.

The TreeView control can be customized with colors for selected text and lines.

International support for the Date control.  Now month names can be customized

in the Date control and stand-alone Calendar control.

New events for the Date control notify before the calendar is dropped down and after it is closed up.

WinX controls are compiled with Visual C++ 5.0.  This means the components require MFC42.DLL, and no longer need MFC40.DLL.


Data Binding with WinX

Many WinX components support data binding, meaning they can be bound to a data control. The following list shows which components support binding, as well as their bound property and the level of support they provide.

Control	Property	Data Type	Support
Currency	Text	String	Read & Write
Date2	Value	String	Read & Write
Marquee	Text	String	Display Only
MaskEdit	TextWithMask	String	Read & Write
Numeric	Text	String	Read & Write
Picture	Picture	Picture	Display Only
Text 3D	Text	String	Display Only
TreeView	See Notes below	See Notes below	Read-Only

Notes

The TreeView control is a complex bound control, like a grid control.  It has a DataSource property which is bound.  However, the TreeView does not display all columns in the data source.  The property ListField determines which column in the data source will be read and displayed as top level items.  For each item read from the database, the events BeforeDBAddNode and AfterDBAddNode are fired, allowing you to customize the items or add sub nodes.  An additional property, BoundText, returns the text of the column bound in TreeView which is currently selected in the data control.


License Agreement

This is a legal agreement between you, the end user, and ProtoView Development Corporation.  By opening this envelope you are agreeing to accept ownership of this product and to be bound by the terms of this agreement.  It also contains proprietary source code which you are entitled to use only under the terms of this license agreement. If, after reading this agreement, you do not agree with its terms, return the software, manuals and diskettes within thirty days of purchase to the party from whom you received it for a refund. In order to receive a refund, the disk and manuals must be in resellable condition. IF YOU PURCHASE THE SOURCE THE SALE IS FINAL.

ProtoView Software License For WinX

1.  Grant of License. ProtoView Development Corp. grants a limited, non-exclusive license to use one copy of the application development tool called WinX Component Library for the purpose of developing applications for the Windows environment.  This copy of ProtoView must exist on a single terminal connected to a single computer (i.e., with a single CPU).  You may not network WinX or otherwise use it for development on more than one computer at the same time.

2. Runtime Distribution License.  ProtoView Development Corp. grants you a royalty-free right to distribute copies of the runtime dynamic link libraries for use with applications you have developed using WinX.  WinX runtime files are listed in exhibit A.  These libraries may not be distributed for any other purpose than to accompany software that you have developed using WinX.   You may  use WinX in your specific purpose application programs, in which case ProtoView grants you permission under ProtoView's copyright to use, give away or sell such programs without additional licenses or fees, as long as all copies of these programs bear a valid copyright notice and provided that your program is not merely a  set or subset of WinX or a compilation or development tool or library which  includes all or a portion of  WinX, or is otherwise a product that is generally competitive with or a substitute for WinX.  This permission is granted solely  for the purpose  set forth above, and you are not authorized to use WinX  in any other  manner.

3. Copyright.  WinX is owned by ProtoView Development Corporation and is protected by United States copyright laws and international treaty provisions.  You may make one copy of the software for backup purposes. You may not, under any circumstances, copy the manual and other written materials that accompany this software.

4. Other Restrictions.  You may not rent or lease WinX software, but you may transfer the software and accompanying written materials on a permanent basis provided you retain no copies and the recipient agrees to the terms of this Agreement.  You may not reverse engineer, decompile, or disassemble this software.

Limited Warranty

ProtoView Development Corp. warrants that the software herein will perform substantially in accordance with the accompanying written materials for a period of thirty days from the date of receipt.  Any implied warranties on ProtoView are limited to ninety days.  Some states do not allow limitations on duration of an implied warranty, so the above limitation may not apply to you.

Customer Remedies. ProtoView's entire liability and your exclusive remedy shall be, at ProtoView's option, either (a) return of the price paid or (b) replacement of the software that does not meet ProtoView's Limited Warranty and which is returned to ProtoView with a copy of your receipt.  This Limited Warranty is void if failure of the software has resulted from accident, abuse, or misapplication. Any replacement of the software will be warranted for the remainder of the original warranty period or 30 days, whichever is longer.

NO OTHER WARRANTIES.  PROTOVIEW DEVELOPMENT DISCLAIMS ALL OTHER WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE SOFTWARE AND THE ACCOMPANYING WRITTEN MATERIALS.  THIS LIMITED WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS.  YOU MAY HAVE OTHERS, WHICH VARY FROM STATE TO STATE.

NO LIABILITY FOR CONSEQUENTIAL DAMAGES.  IN NO EVENT SHALL PROTOVIEW OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS PROTVIEW PRODUCT, EVEN IF PROTOVIEW HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  BECAUSE SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY NOT APPLY TO YOU.

Exhibit A

pvbutton.ocx

pvcalctl.ocx

pvcurr.ocx

pvdate2.ocx

pvdial.ocx

pvfntsel.ocx

pvline.ocx

pvmarq.ocx

pvmask.ocx

pvmltbtn.ocx

pvnum.ocx

pvpict.ocx

pvprgbar.ocx

pvshape.ocx

pvtext.ocx

pvtime.ocx

pvtree.ocx

pvbutton.cab

pvcalctl.cab

pvcurr.cab

pvdate2.cab

pvdial.cab

pvdtcal.cab

pvfntsel.cab

pvline.cab

pvmarq.cab

pvmask.cab

pvmltbtn.cab

pvnum.cab

pvpict.cab

pvprgbar.cab

pvshape.cab

pvtext.cab

pvtime.cab

pvtree.cab


What is WinX

Welcome to the ProtoView WinX Component Library (WinX).  WinX is a set of seventeen new and exciting ActiveX custom controls.  These controls range from data entry fields for date, time and numeric input to graphical controls such as a dial and progress bar to a powerful treeview (hierarchical list) control.  Using these controls you can build sophistcated applications with powerful features built right in.

Because they are ActiveX controls, the WinX Component Library can be used with any development environment that supports ActiveX.

How this Reference is Organized

The WinX Reference is organized into several sections.  The first section introduces WinX, describes how to install the product, and provides some tutorials to familiarize you with the control set.  Then a section is dedicated to each control in the set.  Each control will have its properties, methods and events described in detail.


Installing WinX

Before installing WinX, be sure to read the license agreement included in the product package or displayed during the installation process.

Perform the following steps to install WinX:

Floppy disk Install

1.	Make sure Windows, Windows NT, or Windows 95 is running.
2.	Insert the disk labeled WinX Disk 1 into drive A or B.
3a.	For WFWG 3.1 or higher, or Windows NT, select File | Run from the Program Managers menu.  In the Command Line edit box of the Run dialog, enter A:\SETUP or B:\SETUP depending on where you inserted the setup disk.  Click OK.
3b.	For Windows95, select Start | Run from the task window.  In the Open edit box of the Run dialog, enter A:\SETUP or B:\SETUP depending on where you inserted the setup disk.  Click OK.
4	Follow the instructions given in the installation program.
CD-ROM Install

1.	Make sure Windows, Windows NT, or Windows 95 is running.
2.	Insert the CD labeled ProtoView into drive D or whichever drive is your CD-ROM drive.
3a.	For WFWG 3.1 or higher, or Windows NT, select File | Run from the Program Managers menu.  In the Command Line edit box of the Run dialog, enter D:\SETUP or use another drive letter depending on where you inserted the CD-ROM.  Click OK.
3b.	For Windows95, select Start | Run from the task window.  In the Open edit box of the Run dialog, enter D:\SETUP or use another drive letter depending on where you inserted the CD-ROM.  Click OK.
4	Follow the instructions given in the installation program.
For instructions on how to install WinX into a programming environment such as Microsofts Developer Studio or Visual Basic, see Chapter X: Visual C++ Tutorial and Chapter X: Visual Basic Tutorial.  These tutorials will also show some of the ways in which WinX can be programmed.


Product Support

If you have questions about WinX, you may contact our Technical Support staff.  ProtoView now offers different types of  technical support services for you to choose from.  Please refer to the SUPPORT.HLP file included with your installation for a list of available support plans to choose from.

When contacting our Technical Support staff, please provide the following information:

	Your customer ID, found on the invoice of your product.
	Your product registration number found on the label of each disk that you received with WinX.
	The version of WinX you are using and the file dates of any updates you have installed.
	The exact wording of any messages that appeared on your screen.
	The error code returned from the property or method you are having a problem with.
	A brief and concise explanation of the question or problem that you are experiencing.
	How you tried to solve the problem.


WinX File Listing

WinX will install different components based on the install you purchased and options you select during the install process.  Certain components will not be installed if you do not select those options during the installation.

A WinX ActiveX setup may install the following components:

1.	The WinX 32-bit ActiveX library (.OCX) pvbutton.ocx pvcalctl.ocx pvcurr.ocx pvdate.ocx (Before February,1997) pvdate2.ocx (After February, 1997) pvdial.ocx pvfntsel.ocx pvline.ocx pvmarq.ocx pvmask.ocx pvmltbtn.ocx pvnum.ocx pvpict.ocx pvprgbar.ocx pvshape.ocx pvtext.ocx pvtime.ocx pvtree.ocx
2.	Cabinet Files (Release Install Only) pvbutton.cab pvcalctl.cab pvcurr.cab pvdate2.cab pvdial.cab pvdtcal.cab pvfntsel.cab pvline.cab pvmarq.cab pvmask.cab pvmltbtn.cab pvnum.cab pvpict.cab pvprgbar.cab pvshape.cab pvtext.cab pvtime.cab pvtree.cab
3.	Sample Files
4.	Help Files


Visual Basic Tutorial

Introduction

This tutorial will show how to use WinX using Visual Basic 32-bit.  We will only use the ProtoView Date Edit control for this tutorial, although the steps described will work with all the controls.  This tutorial will show how you can:

	Add WinX controls to a project
	Using visual programming, add the ProtoView Date Edit to a dialog and set properties on the ProtoView Date Edit control
	Programmatically set and retrieve dates
	Respond to events from the ProtoView Date Edit control
Installing WinX in Visual Basic

WinX controls can be added to a specific Visual Basic Project or added to the Visual Basic default project for inclusion in all projects.

Adding ProtoView Date Edit to the default Visual Basic Project:

To add the ProtoView Date Edit to the default project, you must first open the default project.  Choose the File | Open Project menu item to invoke the Open Project dialog. Select the project Auto32ld.vbp from your Visual Basic directory and press the OK button.  Now when you create a new project as described under Create a New Project, the ProtoView Date Edit will automatically be available to that project.  Just follow the steps beginning at Adding ProtoView Date Edit to a Form.

Create a New Project:

Start a new project by choosing the menu File | New Project. To use the ProtoView Date Edit in Visual Basic, the ProtoView Date Edit must be added to your project.  The ActiveX can either be added to each project that uses the ProtoView Date Edit or added to the default project.  By adding the ActiveX to the default project, the ProtoView Date Edit ActiveX is automatically loaded whenever you start Visual Basic or create a new project.

Adding ProtoView Date Edit to a Visual Basic Project:

If ProtoView Date Edit is not part of the default project and you wish to add it to an existing or a new project, choose the Tools | Custom Controls menu item to invoke the Custom Controls dialog to add the ProtoView Date Edit ActiveX file.

Adding ProtoView Date Edit in Visual Basic

Select ProtoView Date2 Control from the Available Controls list box and press the OK button.  If  ProtoView Date2 Control is not visible in the list, use the Browse button to locate and register the PVDATE2.OCX control.

The ProtoView Date Edit icon, [image], is now displayed in the Toolbox. ProtoView Date Edit behaves like any other control.  It can be dragged from the Toolbox to a form, its properties can be retrieved or set, and event procedures can be created.

Visually Designing with WinX

When designing in Visual Basic with WinX controls, you can add WinX controls to a form and visually set properties on the controls to change the basic behavior of the controls.

Add ProtoView Date Edit to a Form

Add two buttons in the lower left corner of the dialog.  By default they will be called Command1 and Command2.  Give one button the text Set Date and the second button the text Get Date.  Next, select the ProtoView Date Edit icon, [image], from the Toolbox and draw the ProtoView Date Edit control on the form.

ProtoView Date Edit during design mode.

When finished your dialog should look like the picture above.  The ProtoView Date Edit will be drawn as a drop-down control with a date displayed.

Setting Properties on the ProtoView Date Edit:

Right click on the ProtoView Date Edit and choose Properties from the floating menu. ProtoView Date Edit has several properties which can be set to change its display mode.  Switch to the Styles property page.

ProtoView Date Edit Properties sheet

Select the Display Format as LED.  Click the Apply button.  You will see the control on the form painted with an LED effect.  Now change to the Display Format to Odometer and click the Apply button.  The control will draw itself as an odometer.  Change the display back to Normal.  Close the property page by clicking OK.

ProtoView Date Edit after the properties have been set.

Programming WinX

Most applications will want to load and retrieve dates from ProtoView Date Edit at runtime.  We will now demonstrate how to set and retrieve the date from the ProtoView Date Edit control.

Adding Code to SetDate:

Double click on the button marked Set Date to add an event procedure to the command1_click event.  Add the following code to the button SetDate:

Dim value As Date

Rem set the date to December 31, 1996
value = #12/31/96#

Rem transfer the date to the ProtoView Date Edit control
PVDate21.value = value

Adding Code to GetDate:

Double click on the button marked Get Date to add an event procedure to the command2_click event.  Add the following code to the button GetDate:

Dim value As Date
Dim DateDay, DateMonth, DateYear As Integer

Rem retrieve the value from the ProtoView Date Edit
value = PVDate21.value

Rem retrieve the individual date values
DateDay = Day(value)
DateMonth = Month(value)
DateYear = Year(value)

Rem compare the date
If (DateDay = 31 And DateMonth = 12 And DateYear = 1996) Then
   MsgBox "That is the last day of 1996"
Else
   MsgBox "That is not the last day of 1996"
End If

Run the program now.  Press the button Set Date.  The Date Edit control will now display the date 12/31/96.  Now press the button Get Date.  A message box with the text That is the last day of 1996 will be displayed.  Quit the application and return to Visual Basic.

Responding to Events

Most WinX controls send events on key actions to allow programmers to add sophisticated responses to the WinX controls.

Responding to the Change Event

Invoke the Code Window by left double-clicking on the ProtoView Date Edit.  Choose Change from the Procedure listbox.

Add the following code to the ProtoView Date Edits Change event:

Dim value As Date
Dim DateDay, DateMonth, DateYear As Integer

Rem retrieve the value from the ProtoView Date Edit
value = PVDate21.value

Rem retrieve the individual date values
DateDay = Day(value)
DateMonth = Month(value)
DateYear = Year(value)

Rem compare the date
If (DateDay = 31 And DateMonth = 12 And DateYear = 1996) Then
   MsgBox "That is the last day of 1996"
Else
   MsgBox "That is not the last day of 1996"
End If

Run the program again.  Click on the arrow on the Date control.  A display of the current month will appear.  Choose a new date from the list.  This will trigger a Change event, which will then compare that date to December 31, 1996.  If successful, a message box with the text That is the last day of 1996 will be displayed.  Stop the program and quit Visual Basic

The Date Edit control with its calendar displayed.

Conclusion

This concludes the Visual Basic tutorial of the ProtoView Date Edit.  We have shown just some of the basic features and capabilities of the ProtoView Date Edit.  When using the ProtoView Date Edit in Visual Basic you will use these same four techniques:

	Add the WinX Date to a specific Visual Basic project or the default Visual Basic project.
	Place the ProtoView Date Edit on a form and set properties for the ProtoView Date Edit.
	Add code to invoke methods and properties of the ProtoView Date Edit to get or set date value.
	Respond to events from the ProtoView Date Edit to perform special actions.


Visual C++ Tutorial

Introduction

This tutorial will show how to use WinX using Microsoft Developer Studio.  We will only use the ProtoView Date Edit control for this tutorial, although the steps described will work with all the controls.  This tutorial will show how you can:

	Register WinX controls in the Developer Studios Component Gallery
	Add the ProtoView Date Edit to a dialog and set properties on the ProtoView Date Edit control
	Programmatically set and retrieve dates
	Respond to events from the ProtoView Date Edit control
Adding WinX to an Application

To use any WinX controls in a Visual C++ project, you must insert the control from the Component Gallery.

Creating a Generic Program

Choose the File | New menu item.  Choose Project Workspace from the list and press OK.  The New Project Workspace dialog is now visible. Choose MFC AppWizard (exe) from the Type list box.  Enter WinXdemo in the Name edit box, and press the Create button.  On the MFC AppWizard - Step 1 dialog, choose Dialog Based as the type of application and press the Next button.  On the MFC AppWizard - Step 2 dialog, select the OLE Controls checkbox and press the Finish button.  On the New Project Information dialog, press the OK button.

Installing the ProtoView Date Edit in Microsofts Developer Studio

The 32-bit ProtoView Date Edit ActiveX can be installed into Microsofts Developer Studios Component Gallery.  If the ProtoView Date Edit ActiveX is properly registered it will automatically be added to the component gallery.

Note: Visual C++ 4.0 did not automatically add registered controls to the component gallery.  You must explicitly add the ProtoView Date Edit to the component gallery.  To add the ProtoView Date Edit to the Component Gallery, choose the menu item Insert | Component to invoke the Component Gallery dialog.  From the OLE Controls tab page, choose the ProtoView Date2 Object icon, and press the Insert button.  Press the OK button on the Confirm Class dialog.  Press the Close button on the Component Gallery dialog.

To add the ProtoView Date Edit ActiveX to an application you must be sure to insert the ProtoView Date Edit from the Component Gallery into your application.  In Visual C++ select Insert | Component to invoke the Component Gallery dialog.  Click the OLE Controls tab page of the Component Gallery.

Highlight ProtoView Date Edit and click the Insert button.  VC++ will confirm that you want to add the ProtoView Date Edit ActiveX to your project.  Including the ProtoView Date Edit ActiveX will add several source and header files to your project.  Click OK to confirm the addition of these files and click Close to close the Component Gallery.

Visual Designing with WinX

When designing dialogs in Visual C++ with WinX controls, you can add WinX controls to a dialog and visually set properties on the controls to change the basic behavior of the controls.

Adding the ProtoView Date Edit to a Dialog

From the resource page of the Project Workspace window, double-click the entry IDD_WINXDEMO_DIALOG.

The Project Workspace window.

Delete the TODO: Place dialog controls here. static text field.  Add two buttons in the lower left corner of the dialog.  Give one button the ID IDC_SETDATE and the text Set Date and the second button the ID IDC_GETDATE and the text Get Date.

Select the ProtoView Date Edit icon, [image], from the control palette and place the control on the dialog.

Note:  If the ProtoView Date Edit icon does not appear on your control palette see the section Installing the ProtoView Date Edit in Microsofts Developer Studio.

Size the ProtoView Date Edit control so that it takes up the upper-left corner of the dialog.

ProtoView Date Edit when designing in AppStudio.

When finished your dialog should look like the picture above.  The ProtoView Date Edit will be drawn as a drop-down control with a date displayed.

Setting Properties on the ProtoView Date Edit

Double click on the ProtoView Date Edit control to invoke the properties window.  ProtoView Date Edit has several properties which can be set.  Switch to the Styles property page.

The ProtoView Date Edit Properties sheet.

Select the Display Format as LED.  You will see the control on the form painted with an LED effect.  Now change to the Display Format to Odometer.  The control will draw itself as an odometer.  Change the display back to Normal.  Close the property page.

ProtoView Date Edit after the properties have been set.

Programming WinX

Most applications will want to load and retrieve dates from ProtoView Date Edit at runtime.  We will now demonstrate how to set and retrieve the date from the ProtoView Date Edit control.

Using ClassWizard

Invoke ClassWizard by pressing CTRL+W.  Select the Member Variables tab page.  Select IDC_DATEEDIT1 from the Control IDs list box and press the Add Variable  button.  On the Add Member Variable dialog box, enter m_date in the Member variable name edit box.  Press the OK button.

Add a member variable to the project in Class Wizard.

Switch to the Message Maps tab page, select IDC_SETDATE from the Object IDs list box and BN_CLICKED from the Messages list box.  Press the Add Function  button.  Press OK on the Add Member Function dialog.  Press Edit Code on the ClassWizard dialog.  Add the code below to the OnSetDate function.

void CWinXdemoDlg::OnSetdate()
{
// TODO: Add your control notification handler code here
COleDateTime date;
DATE value;

// set the date to December 31, 1996
date.SetDate(1996, 12, 31);

// store the date in a DATE variable
value = date;

// transfer the date to the ProtoView Date Edit control
m_date.SetValue(value);
}

Code for setting a date.

Invoke ClassWizard by pressing CTRL+W.  Switch to the Message Maps tab page, select IDC_GETDATE from the Object IDs list box and BN_CLICKED from the Messages list box.  Press the Add Function  button.  Press OK on the Add Member Function dialog.  Press Edit Code on the ClassWizard dialog.  Add the code below to the OnGetDate function.

void CWinXdemoDlg::OnGetdate()
{
// TODO: Add your control notification handler code here
COleDateTime date;
DATE value;
int Day, Month, Year;

// retrieve the value from the ProtoView Date Edit
value = m_date.GetValue();
// store the value in a COleDateTime class
date = value;

// use the COleDateTime to retrieve individual items of the date
Day = date.GetDay();
Month = date.GetMonth();
Year = date.GetYear();

// compare the date
if(Day == 31 && Month == 12 && Year == 1996)
{
MessageBox("That is the last day of 1996",
"Message", MB_OK);
}
else
{
MessageBox("That is not the last day of 1996",
"Message", MB_OK);
}
}

Code for getting a date.

Compile and run the program by selecting the menu items Build | Build WinXdemo.exe and Build | Execute WinXdemo.exe.  Press the button Set Date.  The Date Edit control will now display the date 12/31/96.  Now press the button Get Date.  A message box with the text That is the last day of 1996 will be displayed.  Quit the application and return to the Developer Studio.

Responding to Events

Next we are going to respond to a change event to query the ProtoView Date Edit control.  We will determine what the new date is and compare it to the date December 31, 1996.

Add an Event Procedure

Invoke ClassWizard again by pressing CTRL+W.  Select the Message Maps tab page.  Select IDC_PVDATE21 from the Object IDs list box and Change from the Messages list box.  Press the Add Function button.

Adding an event with Class Wizard.

Press OK on the Add Member Function dialog.  Press Edit Code on the ClassWizard dialog.  Add the code below to the OnChangeDateEdit1 function.

void CWinXdemoDlg::OnChangePVDate21()
{
// TODO: Add your control notification handler code here

OnGetdate();
}

Code to respond to a click event.

Recompile and run the program.  Click on the arrow on the Date control.  A display of the current month will appear.  Choose a new date from the list.  This will trigger an OnChange event, which will then compare that date to December 31, 1996.  If successful, a message box with the text That is the last day of 1996 will be displayed.  Quit the application and return to the Developer Studio.

The ProtoView Date Edit with its calendar displayed.

Conclusion

This concludes the Visual C++ tutorial of the ProtoView Date Edit.  We have shown just some of the basic features and capabilities of the ProtoView Date Edit.  When using the ProtoView Date Edit in Visual C++ you will use these same four techniques:

	Insert the ProtoView Date Edit from the Component Gallery into your application.
	Place the ProtoView Date Edit on a form and set properties for the ProtoView Date Edit.
	Add code to invoke methods and properties of the ProtoView Date Edit to get or set a date value.
	Respond to events from the ProtoView Date Edit to perform special actions.


ProtoView Button Control

The ProtoView Button control behaves like a normal Windows button, but with several advantages.  You can display a picture provided with the ProtoView Button control or your own custom picture, or display a color code (a rectangle filled with a specific color).  The ProtoView Button can send a single click event or repeat the click event as long as the user holds the mouse depressed over the control.

 Button Properties

 Button Methods

 Button Events

Example of the ProtoView Button with a Color Code, a built-in picture, and plain text.


Button Properties

List of Properties

The ProtoView Button control supports the following properties:

BackColor Caption (Default) ColorCodeColor  CustomPicture  DarkHighlight  DarkShadow	DefaultButton  Enabled Font ForeColor hWnd LightHighlight	LightShadow  Picture  RepeatButton  SpecialEffect


Caption

Caption returns or sets the text displayed on the face of the Button control.  This is the default property of the Button control.

Syntax

Visual Basic

object.Caption = string

string = object.Caption

C++

object.SetCaption(string);

string = object.GetCaption();

Delphi

object.Caption := string;

string := object.Caption;

The Caption propertys syntax has these parts:

Part	Description
object	A Button object.
string	A string that determines the text to be displayed on the face of a Button control.
Settings

The settings for string are:

Setting	Description
0	No bevel will be painted.
1	A raised bevel will be painted giving the impression that the picture is outdented from the screen.
2	A sunken bevel will be painted giving the impression that the picture is indented in the screen.
Remarks

You can configure a shortcut key by placing an & symbol in front of the letter you wish to define as the shortcut key. By placing an & sign in front of a letter of the caption, the letter becomes underlined, and you can click the button by pressing the Alt-letter combination from the keyboard.

If you wish to display an & symbol on the button, include two & symbols back-to-back.


ColorCodeColor

ColorCodeColor returns or sets the color code color of the Button.

Syntax

Visual Basic

object.ColorCodeColor = color

color = object.ColorCodeColor

C++

object.SetColorCodeColor(color);

color = object.GetColorCodeColor();

Delphi

object.ColorCodeColor := color;

color := object.ColorCodeColor;

The ColorCodeColor property syntax has these parts:

Part	Description
object	A Button object.
color	A color value or constant that determines the color code color of a Button object, as described in Settings.
Remarks

See the section Notes About Colors.


CustomPicture

The CustomPicture property sets or returns the picture displayed on the Button control.

Syntax

Visual Basic

object.CustomPicture = picture

picture = object.CustomPicture

C++

object.SetCustomPicture(picture);

picture = object.GetCustomPicture();

Delphi

object.CustomPicture := picture;

picture := object.CustomPicture;

The CustomPicture property syntax has these parts:

Part	Description
object	A Button object.
Picture	A picture object which contains a graphic to assign the Button control.
Settings

The settings for Picture are:

Setting	Description
(None)	(Default) No picture.
(Bitmap, icon, metafile)	Specifies a graphic.  You can load the graphic from the Properties window at design time.  At run time, you can also set this property using the LoadPicture function on a bitmap, icon, or metafile.
Remarks

At design time, you can transfer a graphic with the Clipboard using the Copy, Cut, and Paste commands on the Edit menu.  At run time, you can use Clipboard methods such as GetData, SetData, and GetFormat with the nontext Clipboard constants vbCFBitmap, vbCFMetafile, and vbCFDIB, which are listed in the Visual Basic (VB) object library in the Object Browser.

When setting the CustomPicture property at design time, the graphic is saved and loaded with the form.  If you create an executable file, the file contains the image.

Note   At run time, the CustomPicture property can be set to any other object's Picture property, or you can assign it the graphic returned by the LoadPicture function.


DarkHighlight

DarkHighlight returns or sets the dark highlight color of the Button.

Syntax

Visual Basic

object.DarkHighlight = color

color = object.DarkHighlight

C++

object.SetDarkHighlight(color);

color = object.GetDarkHighlight();

Delphi

object.DarkHighlight := color;

color := object.DarkHighlight;

The DarkHighlight property syntax has these parts:

Part	Description
object	A Button object.
color	A color value or constant that determines the dark highlight color of a Button object, as described in Settings.
Remarks

See the section Notes About Colors.


DarkShadow

DarkShadow returns or sets the dark shadow color of the Button.

Syntax

Visual Basic

object.DarkShadow = color

color = object.DarkShadow

C++

object.SetDarkShadow(color);

color = object.GetDarkShadow();

Delphi

object.DarkShadow := color;

color := object.DarkShadow;

The DarkShadow property syntax has these parts:

Part	Description
object	A Button object.
color	A color value or constant that determines the dark shadow color of a Button object, as described in Settings.
Remarks

See the section Notes About Colors.


DefaultButton

DefaultButton returns or sets the display style of the Button control.

Syntax

Visual Basic

object.DefaultButton = boolean

boolean = object.DefaultButton

C++

object.SetDefaultButton(boolean);

boolean = object.GetDefaultButton();

Delphi

object.DefaultButton := boolean;

boolean := object.DefaultButton;

The DefaultButton propertys syntax has these parts

Part	Description
object	A Button object.
boolean	A Boolean expression that specifies whether object is drawn with a thick border to signify the default button state.
Settings

The settings for boolean are:

Setting	Description
True	The button is the default button.
False	(Default) The button is not the default button.


LightHighlight

LightHighlight returns or sets the light highlight color of the Button.

Syntax

Visual Basic

object.LightHighlight = color

color = object.LightHighlight

C++

object.SetLightHighlight(color);

color = object.GetLightHighlight();

Delphi

object.LightHighlight := color;

color := object.LightHighlight;

The LightHighlight property syntax has these parts:

Part	Description
object	A Button object.
color	A color value or constant that determines the light highlight color of a Button object, as described in Settings.

Remarks

See the section Notes About Colors.


LightShadow

LightShadow returns or sets the light shadow color of the Button.

Syntax

Visual Basic

object.LightShadow = color

color = object.LightShadow

C++

object.SetLightShadow(color);

color = object.GetLightShadow();

Delphi

object.LightShadow := color;

color := object.LightShadow;

The LightShadow property syntax has these parts:

Part	Description
object	An object expression that evaluates to a Button control.
color	A color value or constant that determines the light shadow color of a Button object, as described in Settings.
Remarks

See the section Notes About Colors.


Picture

The Picture property sets or returns the picture displayed on the Button control.

Syntax

Visual Basic

object.Picture = value

value = object.Picture

C++

object.SetPicture(value);

value = object.GetPicture();

Delphi

object.Picture:= value;

value := object.Picture;

The Picture property syntax has these parts:

Part	Description
object	A Button object.
value	A constant that determines the picture that will be on the Button control, as described in Settings.
Settings

The settings for value are:

Setting	Description
0	(Default) Green Traffic Light
1	Yellow Traffic Light
2	Red Traffic Light
3	Question Mark
4	Exclamation Sign
5	Plus Sign
6	Minus Sign
7	Edit Pad
8	Note Pad
9	Circle with Diagonal
10	Red X
11	Diskette
12	Waste Basket
13	Tools
14	Printer


RepeatButton

RepeatButton returns or sets the repeat state of the Button.

Syntax

Visual Basic

object.RepeatButton = boolean

boolean = object.RepeatButton

C++

object.SetRepeatButton(boolean);

boolean = object.GetRepeatButton();

Delphi

object.RepeatButton := boolean;

boolean := object.RepeatButton;

The RepeatButton property syntax has these parts:

Part	Description
object	A Button object.
boolean	A Boolean expression that specifies whether object continues to send button down events while the button is pressed.

Settings

The settings for boolean are:

Setting	Description
False	(Default) The button responds normally. When the button is pressed, a single button click event is generated.
True	The button continues to generate button click events as long as the button is pressed.

Remarks

The rate at which the button click events are generated is identical to the keyboard repeat rate.


SpecialEffect

SpecialEffect returns or sets the display style of the Button control.

Syntax

Visual Basic

object.SpecialEffect = value

value = object.SpecialEffect

C++

object.SetSpecialEffect(value);

value = object.GetSpecialEffect();

Delphi

object.SpecialEffect := value;

value := object.SpecialEffect;

The SpecialEffect propertys syntax has these parts:

Part	Description
object	A Button object.
value	A constant that determines the display style of a Button control as described in settings.
Settings

The settings for value are:

Setting	Description
0	No special effect.
1	(Default) A picture is displayed on the button.
2	A color code is displayed on the button.


Button Methods

List of Methods

The ProtoView Button control supports the following methods:

AboutBox	ResetColorScheme	SetRedraw


ResetColorScheme

Resets the color scheme of a Button object back to the original settings.

Syntax

Visual Basic

object.ResetColorScheme

C++

object.ResetColorScheme();

Delphi

object.ResetColorScheme;

The ResetColorScheme method syntax has the following parts:

Part	Description
object	A Button object.
Remarks

This method resets the color scheme of a Button object back to its original settings. The original settings match the color scheme chosen for the display as set in the control panel.


SetRedraw

Sets the redraw state of a Button object.

Syntax

Visual Basic

object.SetRedraw bRedraw

C++

object.SetRedraw(bRedraw);

Delphi

object.SetRedraw(bRedraw : Boolean);

The SetRedraw method syntax has these parts:

Part	Description
object	A Button object.
bRedraw	A Boolean expression that specifies whether object will repaint itself.
Settings

The settings for value are:

False	The button will not repaint itself.
True	(Default) The button will repaint itself.
Remarks

To prevent redrawing of the Button object, set the bRedraw parameter to False. This will prevent the Button object from redrawing itself until the redraw state is set back to True. This method is useful to prevent unwanted redraws while a number of properties are being set.


Button Events

List of Events

The ProtoView Button control supports the following events:

Click KeyDown	KeyPress KeyUp	MouseDown MouseUp


ProtoView Calendar Control

The ProtoView Calendar control is a visual display for showing months, days and days of  the week.  It can be used in a read-only capacity or allow the user to select a date.  The Calendar control is configurable to display one, three, six or twelve month increments.  The one-month calendar can also be displayed by the ProtoView Date Edit control.  The strings displayed for the months and days of the week can be customized for international support.

 Calendar Properties

 Calendar Methods

 Calendar Events

The Calendar control displaying a single month.

The Calendar control displaying six months.  Notice the different colors of the Sundays.


Calendar Properties

List of Properties

The ProtoView Calendar control supports the following properties:

Appearance AutoSizeFont  BackColor BkDayColor BkHighlightColor BorderStyle DayColor	Enabled EnablePeriodEdit  EnableYearEdit  Font ForeColor Format	HighlightColor hWnd ReadOnly  SundayColor  SundayBkColor  Value


AutoSizeFont

Returns or sets a value that determines whether the font used in a Calendar control will be proportional to the size of the control.

Syntax

Visual Basic

object.AutoSizeFont = boolean

boolean = object.AutoSizeFont

C++

object.SetAutoSizeFont(boolean);

boolean = object.GetAutoSizeFont();

Delphi

object.AutoSizeFont := boolean;

boolean := object.AutoSizeFont;

The AutoSizeFont property syntax has these parts:

Part	Description
object	An object expression that evaluates to a Calendar control.
boolean	A Boolean expression that specifies whether the font used in a Calendar control will be proportional to the size of the control.

Settings

The settings for value are:

Setting	Description
True	(Default) The font used to display the Calendar control will be proportional to the size of the control.
False	The control uses the font passed by the parent form.
    Remarks

When set to True, the AutoSizeFont property causes the Calendar control to select a font proportional to the size of the control.


BkDayColor

BkDayColor returns or sets the background color used to display days that do not fall on Sunday in a Calendar control.

Syntax

Visual Basic

object.BkDayColor = color

color = object.BkDayColor

C++

object.SetBkDayColor(color);

color = object.GetBkDayColor();

Delphi

object.BkDayColor := color;

color := object.BkDayColor;

The BkDayColor property syntax has these parts:

Part	Description
object	An object expression that evaluates to a Calendar control.
color	A value or constant that the background color used to display days that do not fall on Sunday in a Calendar control, as described in Settings.
Remarks

See the section Notes About Colors.


BkHighlightColor

BkHighlightColor returns or sets the background color used to display the currently selected day in a Calendar control.

Syntax

Visual Basic

object.BkHighlightColor = color

color = object.BkHighlightColor

C++

object.SetBkHighlightColor(color);

color = object.GetBkHighlightColor();

Delphi

object.BkHighlightColor := color;

color := object.BkHighlightColor;

The BkHighlightColor property syntax has these parts:

Part	Description
object	An object expression that evaluates to a Calendar control.
color	A value or constant that the background color used to display the currently selected day, as described in Settings.
Remarks

See the section Notes About Colors.


DayColor

DayColor returns or sets the foreground color used to display days that do not fall on Sunday in a Calendar control.

Syntax

Visual Basic

object.DayColor = color

color = object.DayColor

C++

object.SetDayColor(color);

color = object.GetDayColor();

Delphi

object.DayColor := color;

color := object.DayColor;

The DayColor property syntax has these parts:

Part	Description
object	An object expression that evaluates to a Calendar control.
color	A value or constant that the foreground color used to display days that do not fall on Sunday in a Calendar control, as described in Settings.
Remarks

See the section Notes About Colors.


EnablePeriodEdit

Returns or sets a value that determines whether the period can be changed on a Calendar control.

Syntax

Visual Basic

object.EnablePeriodEdit = boolean

boolean = object.EnablePeriodEdit

C++

object.SetEnablePeriodEdit(boolean);

boolean = object.GetEnablePeriodEdit();

Delphi

object.EnablePeriodEdit := boolean;

boolean := object.EnablePeriodEdit;

The EnablePeriodEdit property syntax has these parts:

Part	Description
object	An object expression that evaluates to a Calendar control.
boolean	A Boolean expression that specifies whether object allows the period to be edited on the calendar.

Settings

The settings for boolean are:

Setting	Description
True	(Default) Allows the period to be changed on a calendar control.
False	Makes the period on a calendar control read-only.


EnableYearEdit

Returns or sets a value that determines whether the year can be changed on a calendar control.

Syntax

Visual Basic

object.EnableYearEdit = boolean

boolean = object.EnableYearEdit

C++

object.SetEnableYearEdit(boolean);

boolean = object.GetEnableYearEdit();

Delphi

object.EnableYearEdit := boolean;

boolean := object.EnableYearEdit;

The EnableYearEdit property syntax has these parts:

Part	Description
object	An object expression that evaluates to a Calendar control.
boolean	A Boolean expression that specifies whether object allows the year to be edited on the calendar.
Settings

The settings for value are:

Setting	Description
True	(Default) Allows the year to be changed on a calendar control.
False	Makes the year on a calendar control read-only.


Format

Returns the format style for a Calendar object, read only at run time.

Syntax

Visual Basic

value = object.Format

C++

value = object.GetFormat();

Delphi

value := object.Format;

The Format propertys syntax has these parts:

Part	Description
object	An object expression that evaluates to a Calendar control.
value	A constant that specifies the format of the calendar control.
Settings

The settings for value are:

Setting	Description
SingleMonth	(Default) A single month is displayed in the Calendar control.
HorizontalQuarter	Displays 3 consecutive months in a horizontal arrangement.
VerticalQuarter	Displays 3 consecutive months in a vertical arrangement.
HalfYear	Displays 6 consecutive months.
FullYear	Displays a full year in the Calendar control.


HighlightColor

HighlightColor returns or sets the foreground color used to display the currently selected day in a Calendar control.

Syntax

Visual Basic

object.HighlightColor = color

color = object.HighlightColor

C++

object.SetHighlightColor(color);

color = object.GetHighlightColor();

Delphi

object.HighlightColor := color;

color := object.HighlightColor;

The HighlightColor property syntax has these parts:

Part	Description
object	An object expression that evaluates to a Calendar control.
color	A value or constant that the background color used to display the currently selected day, as described in Settings.
Remarks

See the section Notes About Colors.


ReadOnly

Returns or sets a value that determines whether the Calendar control can respond to user-generated events.

Syntax

Visual Basic

object.ReadOnly = boolean

boolean = object.ReadOnly

C++

object.SetReadOnly(boolean);

boolean = object.GetReadOnly();

Delphi

object.ReadOnly := boolean;

boolean := object.ReadOnly;

The ReadOnly property syntax has these parts:

Part	Description
object	An object expression that evaluates to a Calendar control.
boolean	A Boolean expression that specifies whether object can respond to user-generated events.
Settings

The settings for boolean are:

Setting	Description
True	(Default) Allows object to respond to events.
False	Prevents object from responding to events.


SundayBkColor

SundayBkColor returns or sets the background color used to display days that fall on Sunday in a Calendar control.

Syntax

Visual Basic

object.SundayBkColor = color

color = object.SundayBkColor

C++

object.SetSundayBkColor(color);

color = object.GetSundayBkColor();

Delphi

object.SundayBkColor := color;

color := object.SundayBkColor;

The SundayColor property syntax has these parts:

Part	Description
object	An object expression that evaluates to a Calendar control.
color	A value or constant that the background color used to display days that fall on Sunday in a Calendar control, as described in Settings.
Remarks

See the section Notes About Colors.


SundayColor

SundayColor returns or sets the foreground color used to display days that fall on Sunday in a Calendar control.

Syntax

Visual Basic

object.SundayColor = color

color = object.SundayColor

C++

object.SetSundayColor(color);

color = object.GetSundayColor();

Delphi

object.SundayColor := color;

color := object.SundayColor;

The SundayColor property syntax has these parts:

Part	Description
object	An object expression that evaluates to a Calendar control.
color	A value or constant that the foreground color used to display days that fall on Sunday in a Calendar control, as described in Settings.
Remarks

See the section Notes About Colors.


Value

Returns or sets the date in a Calendar object.

Syntax

Visual Basic

object.Value = date

date = object.Value

C++

object.SetValue(date);

date = object.GetValue();

Delphi

object.Value := date;

date := object.Value;

The Value property syntax has these parts:

Part	Description
object	An object expression that evaluates to a Calendar control.
date	A Date expression that represents the value of the date selected in the Calendar object.
Remarks

The Value property allows you to set the date represented in the Calendar object at run time.


Calendar Methods

List of Methods

The ProtoView Calendar control supports the following methods:

AboutBox


Calendar Events

List of Events

The ProtoView Calendar control supports the following events:

Change  Click DblClick	KeyDown KeyPress KeyUp	MouseDown MouseMove MouseUp


Change

Occurs when the value of a Calendar control is changed.

Syntax

Visual Basic

Private Sub Object_Change([index As Integer])

Visual C++

void OnChangeObject();

Delphi

Procedure Change(Sender : TObject );

The Change event syntax has these parts:

Part 	Description

Object	An object expression that evaluates to Calendar object.

index	An integer that uniquely identifies a control if it's in a control array.


ProtoView Currency Control

The ProtoView Currency control is an ActiveX control which extends the capabilities of the standard Windows Edit control.  The Currency control is designed to edit text strings representing currency values of any nationality.  It allows developers to select a variety of currency formats including the default Windows settings, selected country defaults or a roll your own version where each aspect of the currency format can be specified independently.

The currency control also has a wide selection of display options.  The control also allows limits to be set for the currency values entered.  In addition to the standard Edit control features, the control has:

	2 edit modes,- insert and overwrite
	7 types of display styles,- regular, formatted, odometer, odometer light, odometer inverted, LED, LED bold
	Undo support
	Custom highlight and disabled text colors
	Automatic vertical alignment of the text at the center of the control window

 Tips to Use Currency Control

 Currency Properties

 Currency Methods

 Currency Events

Example of the ProtoView Currency control.


Tips to use Currency Control

1.	The property ValueReal is a floating point (double) data type representation of the currency property Value. This property is supplied only for easy type conversion. Since it has less precision than the CURRENCY data type, using this property, especially for big values, is not recommended.
2.	The Text property is supplied for the purpose of reading the currency string literally.  If you intend to use it for setting the currency value, then you should be aware that it stop accepting the string once it encounters any non digit characters.  For example, if current positive and negative formats are $#.##    ($#.##), then the text 123456 will set the currency value to $1,234.56 but the string  12AnyText$3.456 will set the control to $12.00.
3.	On a Paste operation, the Currency control will extract only the sign and digits from whatever the clipboard text contains overwrite the contents of the control.
4.	To set just the lower limit for the currency range validation check, set the ValueMin to the desired limit and the ValueMax less than the ValueMin property.  You must also set the LimitValue to True.  It is not possible to set just an upper limit for range validation, though you may set the ValueMax to the desired limit and the ValueMin  to the -910000000000000.
5.	If the LimitValue is set to True, then any attempt to set Value beyond the Min-ValueMax limits will fail.
6.	To change the sign of the current currency value from positive to negative while editing the currency string, you can press the - or ( key at any position.  To change value from negative to positive you can press the + key or delete the (, ), or - character depending on the selected negative format.
7.	If you want the Currency control to set the currency format according to the users computer settings, then you should select the Default currency format.
8.	The Odometer and LED display formats override all default Windows painting colors except for the disabled text color.  If you want to use system colors, you should set them at design time from the combobox System Colors on the Colors Page, or at run time use system color values to set the color properties.
9.	For the Odometer display styles, set the HightlightInverted to True to get the most contrast for highlight colors.
10.	For  better appearance of the Currency control it is advisable to use the High Colors (16 bits, or 64K colors) display setting, when using  the Odometer or OdometerInverted display style.
11.	For the LED display styles the width of characters is calculated at runtime and depends on the height of the control window. For better alignment of the last visible character on the right side of the control window, it is advisable at design time to temporarily fill the control with a long text string and adjust the width of the Currency control window accordingly.


Currency Properties

List of Properties

The ProtoView Currency control supports the following properties:

Alignment Autoscroll CanUndo CopyToClipboard DecimalPlaces DecimalSeparator DisplayFormat EditMode EditModeChange	Format FormatNegative FormatPositive HighlightColor HighlightInverted LimitValue Modified ReadOnly SelectionPersistance	SuppressThousand Symbol Text TextDisabled Value (Default) ValueMax ValueMin ValueReal


Alignment

This property determines the horizontal alignment of the text when the control does not have the input focus.

Syntax

Visual Basic

Currency.Alignment = value

value = Currency.Alignment

C++

Currency.SetAlignment ( value );

value = Currency.GetAlignment ( );

Delphi

Currency.Alignment := value

value := Currency.Alignment

The Alignment property syntax has these parts:

Part	Description
Currency	A Currency object.
value	An integer or a predefined constant that represents the horizontal alignment of the text inside of the control window.
Settings

The settings for value are:

Setting	Description
0 - pvcLeft	The alignment of the text is left justified. (default)
1 - pvcCenter	The text is centered.
2 - pvcRight	The alignment is right justified.


Autoscroll

This property allows the text to automatically scroll horizontally while editing the Currency control text when the text length is longer than the control width.

Syntax

Visual Basic

Currency.Autoscroll = value

value = Currency.Autoscroll

C++

Currency.SetAutoscroll ( value );

value = Currency.GetAutoscroll ( );

Delphi

Currency.Autoscroll := value

value := Currency.Autoscroll

The Autoscroll property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A Boolean which represents the horizontal autoscroll option.
Settings

The settings for value are:

Setting	Description
False	No autoscroll.
True	Horizontal autoscroll while editing the Currency control text. (default)


CanUndo

This property available at run time and can be used to determine if the last change to the currency Value can be undone or not.

Syntax

Visual Basic

value = Currency.CanUndo

C++

value = Currency.GetCanUndo ( );

Delphi

value := Currency.CanUndo

The CanUndo property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A Boolean value.
Settings

The settings for value are:

Setting	Description
False	The currency Value was not modified or changes can not be undone.
True	The currency Value was modified and the last change can be undone.


CopyToClipboard

This property determines what part of the selected text will be copied to the clipboard on a Copy to Clipboard operation (Ctrl C).

Syntax

Visual Basic

Currency.CopyToClipboard = value

value = Currency.CopyToClipboard

C++

Currency.SetCopyToClipboard ( value );

value = Currency.GetCopyToClipboard ( );

Delphi

Currency.CopyToClipboard := value

value := Currency.CopyToClipboard

The CopyToClipboard property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A Boolean value that can be True or False.
Settings

The settings for value are:

Setting	Description
False	Copy the whole selected text string to the clipboard (default).
True	Copy the selected text without thousand separators, currency symbol and sign characters to the clipboard.


DecimalPlaces

This property determines the  number of decimal places in the Currency format string.

Syntax

Visual Basic

Currency.DecimalPlaces = value

value = Currency.DecimalPlaces

C++

Currency.SetDecimalPlaces  ( value );

value = Currency.GetDecimalPlaces ( );

Delphi

Currency.DecimalPlaces := value

value := Currency.DecimalPlaces

The DecimalPlaces property syntax has these parts:

Part	Description
Currency	A Currency object.
value	An integer that represents the number of decimal places in the currency format string.
Settings

The settings for value are:

Setting	Description
0..4	Number of decimal places.


DecimalSeparator

This property determines a character that represents the decimal separator for the Currency format string.

Syntax

Visual Basic

Currency.DecimalSeparator = value

value = Currency.DecimalSeparator

C++

Currency.SetDecimalSeparator  ( value );

value = Currency.GetDecimalSeparator ( );

Delphi

Currency.DecimalSeparator := value

value := Currency.DecimalSeparator

The DecimalSeparator property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A string one character long .
Settings

The settings for value are:

Setting	Description
.	The decimal separator is the . and the thousand separator is the , character. (default)
,	The decimal separator is the , and the thousand separator is the . character.


DisplayFormat

This property determines the style of the text painting.

Syntax

Visual Basic

Currency.DisplayFormat = value

value = Currency.DisplayFormat

C++

Currency.SetDisplayFormat ( value );

value = Currency.GetDisplayFormat ( );

Delphi

Currency.DisplayFormat := value

value := Currency.DisplayFormat

The DisplayFormat property syntax has these parts:

Part	Description
Currency	A Currency object.
value	An integer or a predefined constant that represents the style of the Currency control text painting.
Settings

The settings for value are:

Setting	Description
0 - pvcNormal	The Currency control has the standard  Windows Edit control painting. (default)
1 - pvcFormatted	Formatted  text painting - every character of the text is in a square box.
2 - pvcOdometer	The odometer style text painting - every character is in a rectangle box with shadows: selected background color at the center and black at the bottom and the top.
3 - pvcOdomLight	The odometer style text painting - every character is in a rectangle box with shadows: white at the center and selected background color at the bottom and the top.
4 - pvcOdomInvert	The odometer style painting - every character is in a rectangle box with shadows: black color at the center and selected background at the bottom and the top.
5 - pvcLED	The LED style - characters resemble the Light Emitted Diode display with the selected Background and ForeColors.
6 - pvcLEDBold	The same as LED style but with increased thickness of character lines.


Format

This property determines the format of the Currency control string.

Syntax

Visual Basic

Currency.Format = value

value = Currency.Format

C++

Currency.SetFormat ( value );

value = Currency.GetFormat ( );

Delphi

Currency.Format := value

value := Currency.Format

The Format property syntax has these parts:

Part	Description
Currency	A Currency object.
value	An integer, a predefined constant or their combination that represents the format of the Currency control string.
Settings

The settings for value are:

Setting	Description
0 - pvcCustom	The currency symbol, number of decimal places, decimal and thousand separators, positive and negative formats can be modified for user needs.
1 - pvcDefault	The Currency control reads the current  Windows Currency formats: currency symbol, number of decimal places, decimal and thousand separators, positive and negative formats.
2 - pvcCountry  + 0..24	All currency formats are adjusted for the selected country.


FormatNegative

This property determines the format of the Currency control string for the negative values of a currency.

Syntax

Visual Basic

Currency.FormatNegative = value

value = Currency.FormatNegative

C++

Currency.SetFormatNegative ( value );

value = Currency.GetFormatNegative ( );

Delphi

Currency.FormatNegative := value

value := Currency.FormatNegative

The FormatNegative property syntax has these parts:

Part	Description
Currency	A Currency object.
value	An integer which represents the format of the Currency control string for negative values.
Settings

The settings for value are:

Setting	Description
0	Currency symbol, number inside parenthesis ($1.50).
1	Minus, currency symbol, number: -$1.50
2	Currency symbol, minus, number: $-1.50
3	Currency symbol, number, number: $1.50-
4	Number, currency symbol inside parenthesis: (1.50$)
5	Minus, number, currency symbol: -1.50$
6	Number, minus, currency symbol: 1.50-$
7	Number, currency symbol, minus: 1.50$-
8	Minus, number, space, currency symbol: -1.50 $
9	Minus, currency symbol, space, number: -$ 1.50
10	Number, space, currency symbol, minus: 1.50 $-


FormatPositive

This property determines the format of the Currency control string for the positive values of currency.

Syntax

Visual Basic

Currency.FormatPositive = value

value = Currency.FormatPositive

C++

Currency.SetFormatPositive ( value );

value = Currency.GetFormatPositive ( );

Delphi

Currency.FormatPositive := value

value := Currency.FormatPositive

The FormatPositive property syntax has these parts:

Part	Description
Currency	A Currency object.
value	An integer which represents the format of the Currency control string for positive values.
Settings

The settings for value are:

Setting	Description
0	Currency symbol, number: $1.50
1	Number, currency symbol: 1.50$
2	Currency symbol, space, number: $ 1.50
3	Number, space, currency symbol: 1.50 $


EditMode

This property determines the edit mode of the text.

Syntax

Visual Basic

Currency.EditMode = value

value = Currency.EditMode

C++

Currency.SetEditMode ( value );

value = Currency.GetEditMode ( );

Delphi

Currency.EditMode := value

value := Currency.EditMode

The EditMode property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A Boolean which represents the edit mode option.
Settings

The settings for value are:

Setting	Description
False	The overwrite edit mode. (default)
True	The insert edit mode.


EditModeChange

This property determines whether or not the user can change the edit mode of the Currency control at run time.

Syntax

Visual Basic

Currency.EditModeChange = value

value = Currency.EditModeChange

C++

Currency.SetEditModeChange ( value );

value = Currency.GetEditModeChange ( );

Delphi

Currency.EditModeChange := value

value := Currency.EditModeChange

The EditModeChange property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A Boolean which represents the permission to change the edit mode.
Settings

The settings for value are:

Setting	Description
False	Does not allow the user to change the edit mode.
True	Allows the user to toggle the edit mode using the Insert key. (default)


HighlightColor

This property determines the color used to paint the background of selected text in the control window.

Syntax

Visual Basic

Currency.HighligthColor = value

value = Currency.HighligthColor

C++

Currency.SetHighligthColor ( value );

value = MaksEdit.GetHighligthColor ( );

Delphi

Currency.HighlightColor := value

value := Currency.HighlightColor

The HighligthColor property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A long value specifying a color value
Settings

The settings for value are:

Setting	Description
Color Value	A long value describing the color to paint the Currency background of the selected text.


HighlightInverted

This property determines how to paint the selected text and its background.  By turning this property on, highlighted text assumes the inverted colors of the normal text.

Syntax

Visual Basic

Currency.HighlightInverted = value

value = Currency.HighlightInverted

C++

Currency.SetHighlightInverted ( value );

value = Currency.GetHighlightInverted ( );

Delphi

Currency.HighlightInverted := value

value := Currency.HighlightInverted

The HighlightInverted property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A Boolean which represents an option.
Settings

The settings for value are:

Setting	Description
False	Background of the selected text is painted by the selected HighlightColor. (default)
True	Background and text of the selected text is painted by colors inverted to the original.


LimitValue

This property enables or disables range validation checking for the Currency control.

Syntax

Visual Basic

Currency.LimitValue = value

value = Currency.LimitValue

C++

Currency.SetLimitValue ( value );

value = Currency.GetLimitValue ( );

Delphi

Currency.LimitValue := value

value := Currency.LimitValue

The LimitValue property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A Boolean which enables or disables the validity check of a Currency Value.
Settings

The settings for value are:

Setting	Description
False	No validity check of the Currency Value except checking for limits of the CURRENCY data type. (default)
True	The current currency value is checked for minimum and maximum value limits after every entry and the control allows or forbids the currency Value property modification based on the ValueMax and ValueMin properties.


Modified

This property allows checking of the Currency control to see if it has been modified.  It can also be reset to the unmodified state.

Syntax

Visual Basic

Currency.Modified = value

value = Currency.Modified

C++

Currency.SetModified ( value );

value = Currency.GetModified ( );

Delphi

Currency.Modified := value

value := Currency.Modified

The Modified property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A Boolean value.
Settings

The settings for value are:

Setting	Description
False	The Currency value was not modified since the last time this Modified flag was set to False.
True	The Currency value was modified since the last time this Modified flag was set to False.


ReadOnly

The ReadOnly property controls whether or not the Currency control will accept keyboard input.

Syntax

Visual Basic

object.ReadOnly = boolean

boolean = object.ReadOnly

Visual C++

object.SetReadOnly(boolean);

boolean = object.GetReadOnly();

Delphi

object.ReadOnly := boolean;

boolean:= object.ReadOnly;

The ReadOnly property syntax has these parts:

Part	Description
object	A Currency object.
boolean	A Boolean expression that specifies whether object accepts keyboard input.
Settings

The settings for boolean are:

Setting	Description
True	The Currency control will ignore keyboard input.
False	(Default) The Currency control will accept keyboard input.


SelectionPersistance

This property allows the type of text selection to be defined when the control gets focus through a TAB key.

Syntax

Visual Basic

Currency.SelectionPersistance = value

value = Currency.SelectionPersistance

C++

Currency.SetSelectionPersistance ( value );

value = Currency.GetSelectionPersistance ( );

Delphi

Currency.SelectionPersistance := value

value := Currency.SelectionPersistance

The SelectionPersistance property syntax has these parts:

Part	Description
Currency	A Currency object.
value	An integer that represents an option.
Settings

The settings for value are:

Setting	Description
0	No selection on TAB.
1	The Currency control will restore the selection which it had when it lost focus.
2	The Currency control will select whole text string on TAB. (default)


SuppressThousand

This property enables or disables the showing of thousand separators.

Syntax

Visual Basic

Currency.SuppressThousand = value

value = Currency.SuppressThousand

C++

Currency.SetSuppressThousand  ( value );

value = Currency.GetSuppressThousand ( );

Delphi

Currency.SuppressThousand := value

value := Currency.SuppressThousand

The SuppressThousand property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A Boolean value.
Settings

The settings for value are:

Setting	Description
False	The string representation of the currency Value contains the thousand separators.
True	The string representation of the currency Value does not contain the thousand separators.


Symbol

This property determines the Currency format symbol.

Syntax

Visual Basic

Currency.Symbol = value

value = Currency.Symbol

C++

Currency.SetSymbol  ( value );

value = Currency.GetSymbol ( );

Delphi

Currency.Symbol := value

value := Currency.Symbol

The Symbol property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A string for the currency Symbol.
Settings

The settings for value are:

Setting	Description
A string with the length up to 7 characters.  Digits are not allowed.	A string that represents the currency symbol.


Text

This property represents the Currency control text.

Syntax

Visual Basic

Currency.Text = value

value = Currency.Text

C++

Currency.SetText ( value );

value = MaksEdit.GetText ( );

Delphi

Currency.Text := value

value := Currency.Text

The Text property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A string.
Settings

The settings for value are:

Setting	Description
A string up to 35 characters long	A string representation of the currency Value. For reading, it is the same as the current text in the control.  For writing, the control extracts only digits (up to 19) and the negative sign (if any) from it.


TextDisabled

This property determines the color of the text when the property Enabled is set to False.

Syntax

Visual Basic

Currency.TextDisabled = value

value = Currency.TextDisabled

C++

Currency.SetTextDisabled ( value );

value = MaksEdit.GetTextDisabled ( );

Delphi

Currency.TexpDisabled := value

value := Currency.TextDisabled

The TextDisabled property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A long value specifying a color of the disabled text.
Settings

The settings for value are:

Setting	Description
Color Value	A long value describing the text color when editing is disabled.


Value

This property determines the Currency control Value.

Syntax

Visual Basic

Currency.Value = value

value = Currency.Value

C++

Currency.SetValue ( value );

value = Currency.GetValue ( );

Delphi

Currency.Value := value

value := Currency.Value

The Value property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A CURRENCY data type value.
Settings

The settings for value are:

Setting	Description
Any value that is within the limits of the CURRENCY data type.	The currency value represented in the CURRENCY data type format.   Note for Delphi users: The CURRENCY format will cut the decimal part of a value, so to get or set a value from code with a decimal part, use the ValueReal or Text properties.


ValueMax

This property determines the upper limit of the Currency controls Value property.

Syntax

Visual Basic

Currency.ValueMax = value

value = Currency.ValueMax

C++

Currency.SetValueMax ( value );

value = Currency.GetValueMax ( );

Delphi

Currency.ValueMax := value

value := Currency.ValueMax

The ValueMax property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A CURRENCY data type value for the upper limit of the current Currency Value.
Settings

The settings for value are:

Setting	Description
Any value that is in the limits of the CURRENCY data type.	If this value is greater than the ValueMin and  LimitValue is set to True, then the current currency Value is checked for both limits and the control allows or forbids the Value modification. If this value is less than the ValueMin and the LimitValue is set to True, then the current Currency Value is checked only for a lower limit (ValueMin).


ValueMin

This property determines the lower limit of the Currency control Value.

Syntax

Visual Basic

Currency.ValueMin = value

value = Currency.ValueMin

C++

Currency.SetValueMin ( value );

value = Currency.GetValueMin ( );

Delphi

Currency.ValueMin := value

value := Currency.ValueMin

The ValueMin property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A CURRENCY data type value for the lower limit of the current currency Value.
Settings

The settings for value are:

Setting	Description
Any value that is in the limits of the CURRENCY data type.	If this value is less than the ValueMax and the LimitValue is set to True, then the current currency Value is checked for both limits and the control allows or forbids the Value modification.
Any value that is in the limits of the CURRENCY data type.	If this value is greater than the ValueMax and the LimitValue is set to True, then the current currency Value is checked only for this lower limit.


ValueReal

This property determines the Currency control Value.

Syntax

Visual Basic

Currency.ValueReal = value

value = Currency.ValueReal

C++

Currency.SetValueReal ( value );

value = Currency.GetValueReal ( );

Delphi

Currency.ValueReal := value

value := Currency.ValueReal

The ValueReal property syntax has these parts:

Part	Description
Currency	A Currency object.
value	A double data type value.
Settings

The settings for value are:

Setting	Description
Any double value that is in the limits of the CURRENCY data type.	The currency value represented in the floating point (64 bits long) data type format.


Currency Methods

List of Methods

The ProtoView Currency control supports the following methods:

AboutBox	Undo


Undo

This method undoes the last change to the currency Value.  It also checks for the value of the property  CanUndo and if it is False, then this method returns False, otherwise it returns True. After a call to this method, the CanUndo property is reset to False. Keyboard equivalent of this method is Ctrl - Z.

Syntax

Visual Basic

ReturnValue = Currency.Undo

C++

ReturnValue = Currency.Undo ( );

Delphi

ReturnValue := Currency.Undo()

The Undo method syntax has these parts:

Part	Description
Currency	A Currency object.
ReturnValue	A Boolean value.
Return Values:

Return	Description
False	The currency Value was not modified or changes can not be undone. The method did nothing.
True	The old currency Value was restored.


Currency Events

List of Events

The ProtoView Currency control supports the following events:

Click GotFocusEvent KeyDown	KeyPress KeyUp LostFocusEvent	MouseDown MouseUp


ProtoView Date Edit Control

The ProtoView Date Edit control is used to display and edit date values.  It can be a read-only or editable control for displaying and editing dates.  The control can be customized to display the day-month-year values in any order and with any separator for international support.  It also allows dates to be displayed  in long string representation such as Monday, December 23, 1996, or 23 December 1996. Long date formats does not allow direct user editing, but the drop down calendar and clipboard operations are still available to set or get the date.

The date edit control can manipulate dates from January 1, 101 to December 31, 9999.

The date edit control has:

	7 types of display styles,- regular, formatted, odometer, odometer light, odometer inverted, LED, LED bold.
	Drop down calendar with options to display one, three or six months.
	Custom highlight and disabled text colors.
	2 edit modes - insert and overwrite.
	Automatic vertical alignment of the text at the center of the control              window.

 Date Edit Properties

 Date Edit Methods

 Date Edit Events

 The ProtoView Date Edit control example.


Date Edit Properties

List of Properties

The ProtoView Date Edit control supports the following properties:

Alignment BackColor Border CalendarDOWs CalendarFormat CalendarMonths DateFormat  DateString Day DayOfWeek DayOfYear	DisabledColor DisplayFormat  EditMode EditModeChange Enabled Font ForeColor HighlightColor HighlightInverted Modified Month	NullString Separator  SeparatorDefault Status TimeStore Value (Default) ValueReset  WeekOfYear Year


Alignment

This property determines the horizontal alignment of the text when the control does not have the input focus.

Syntax

Visual Basic

DateEdit.Alignment = value

value = DateEdit.Alignment

C++

DateEdit.SetAlignment ( value );

value = DateEdit.GetAlignment ( );

Delphi

DateEdit.Alignment := value

value := DateEdit.Alignment

The Alignment property syntax has these parts:

Part	Description
DateEdit	A DateEdit object.
value	An integer or a predefined constant that represents the horizontal alignment of the text inside of the control window.
Settings

The settings for value are:

Setting	Description
0 - pvdLeft	The alignment of the text is left justified. (default)
1 - pvdCenter	The text is centered.
2 - pvdRight	The alignment is right justified.


Border

This property determines the border style of the Date Edit control window.

Syntax

Visual Basic

DateEdit.Border = value

value = DateEdit.Border

C++

DateEdit.SetBorder( value );

value = DateEdit.GetBorder( );

Delphi

DateEdit.Border := value

value := DateEdit.Border

The Border property syntax has these parts:

Part	Description
DateEdit	A DateEdit object.
value	An integer or a predefined constant that represents the border style of the control window.
Settings

The settings for value are:

Setting	Description
0 - pvdNone	No border.
1 - pvdFlat	Flat border.
2 - pvd3D	3D border  (default).


CalendarDOWs

This property defines the string representation of the days of the week in the drop-down calendar.

Syntax

Visual Basic

DateEdit.CalendarDOWs = value

value = DateEdit.CalendarDOWs

C++

DateEdit.SetCalendarDOWs(value);

value  = DateEdit.GetCalendarDOWs();

Delphi

DateEdit.CalendarDOWs := value

value := DateEdit.CalendarDOWs

The CalendarDOWs property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	A text string.
Remarks

The string should be 7 characters long. Every character represents a day of the week starting from Sunday. Default value is set to SMTWTFS.


CalendarFormat

This property allows the drop-down calendar to be enabled and determines the number of months shown in the calendar. To show the drop-down calendar, the pvCalCtl.OCX must be registered and installed.

Syntax

Visual Basic

DateEdit.CalendarFormat = value

value = DateEdit.CalendarFormat

C++

DateEdit.SetCalendarFormat( value );

value = DateEdit.GetCalendarFormat( );

Delphi

DateEdit.CalendarFormat := value

value := DateEdit.CalendarFormat

The CalendarFormat property syntax has these parts:

Part	Description
DateEdit	A DateEdit object.
value	An integer or a predefined constant that represents the format of the drop-down calendar.
Settings

The settings for value are:

Setting	Description
0 - pvdNone	The calendar is disabled.
1 - pvdOne	The calendar shows one month (default).
2 - pvdThree	The calendar shows three months.
3 - pvdSix	The calendar shows six months.


CalendarMonths

This property defines the string representation of the months in the drop-down calendar.

Syntax

Visual Basic

DateEdit.CalendarMonths = value

value = DateEdit.CalendarMonths

C++

DateEdit.SetCalendarMonths(value);

value  = DateEdit.GetCalendarMonths();

Delphi

DateEdit.CalendarMonths := value

value := DateEdit.CalendarMonths

The CalendarMonths property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	A text string.
Remarks

The string should contain all 12 months starting from January. Every month is separated from another by the | character. The default value is set to the January|February|March|April|May|June|July|August|September|October|November|December.


DateFormat

This property defines the format string that represents the date Value.

Syntax

Visual Basic

DateEdit.DateFormat = value

value = DateEdit.DateFormat

C++

DateEdit.SetDateFormat(value);

value = DateEdit.GetDateFormat();

Delphi

DateEdit.DateFormat := value

value := DateEdit.DateFormat

The DateFormat property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	An integer or constant that represents the date format.
Settings

The settings for value are:

Setting	Description
0 - pvdShort	The date format is adjusted to the current Windows short date format (Win.ini file).
1 - pvdLong	The date format is adjusted to the current Windows long date format (Win.ini file). This date format is not editable.
2 - pvdMd	The date format is m/d
3 - pvdMmdd	The date format is mm/dd
4 - pvdDm	The date format is d/m
5 - pvdDdmm	The date format is dd/mm
6 - pvdMdyy	The date format is m/d/yy
7 - pvdMmddyy	The date format is mm/dd/yy
8 - pvdDmyy	The date format is d/m/yy
9 - pvdDdmmyy	The date format is dd/mm/yy
10 - pvdMdyyyy	The date format is m/d/yyyy
11 - pvdMmddyyyy	The date format is mm/dd/yyyy
12 - pvdDmyyyy	The date format is d/m/yyyy
13 - pvdDdmmyyyy	The date format is dd/mm/yyyy
Long Formats:	The following date formats are not editable.
14 - pvdLmdy	The date format is mmmm d, yyyy
15 - pvdLmddy	The date format is mmmm dd, yyyy
16 - pvdLdmy	The date format is d mmmm, yyyy
17 - pvdLddmy	The date format is dd mmmm, yyyy
18 - pvdLwmdy	The date format is dow, mmmm d, yyyy
19 - pvdLwmddy	The date format is dow, mmmm dd, yyyy
20 - pvdLwdmy	The date format is dow, d mmmm, yyyy
21 - pvdLwddmy	The date format is dow, dd mmmm, yyyy


DateString

This property is the string representation of the Value property built in accordance with the selected DateFormat.

Syntax

Visual Basic

DateEdit.DateString = value

value = DateEdit.DateString

C++

DateEdit.SetDateString(value);

value  = DateEdit.GetDateString();

Delphi

DateEdit.DateString := value

value := DateEdit.DateString

The DateString property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	A text string.
Remarks

The DateString property can be used for reading and writing the Value.


Day

This property determines the value of the day field in the date.

Syntax

Visual Basic

DateEdit.Day = value

value = DateEdit.Day

C++

DateEdit.SetDay ( value );

value = DateEdit.GetDay ( );

Delphi

DateEdit.Day := value

value := DateEdit.Day

The Day property syntax has these parts:

Part	Description
DateEdit	A DateEdit object.
value	An integer that represents day of the month.
Settings

The settings for value are:

Setting	Description
1..28..31	The maximum value of the Day depends on a particular month.


DayOfWeek

This property is read-only and can be used to determine the day of the week for the date.

Syntax

Visual Basic

value = DateEdit.DayOfWeek

C++

value = DateEdit.GetDayOfWeek ( );

Delphi

value := DateEdit.DayOfWeek

The DayOfWeek property syntax has these parts:

Part	Description
DateEdit	A DateEdit object.
value	An integer that represents day of the week.
Settings

The settings for value are:

Setting	Description
1..7	The 1 represents Sunday, 2 - Monday, etc.


DayOfYear

This property is read only and can be used to determine the day of the year for the date.

Syntax

Visual Basic

value = DateEdit.DayOfYear

C++

value = DateEdit.GetDayOfYear ( );

Delphi

value := DateEdit.DayOfYear

The DayOfYear property syntax has these parts:

Part	Description
DateEdit	A DateEdit object.
value	An integer that represents day of the year.
Settings

The settings for value are:

Setting	Description
1..366	The 1 represents January 1.


DisabledColor

This property determines the color used to paint the text when the Enabled property is set to False.

Syntax

Visual Basic

DateEdit.DisabledColor = value

value = DateEdit.DisabledColor

C++

DateEdit.SetDisabledColor ( value );

value = DateEdit.GetDisabledColor ( );

Delphi

DateEdit.DisabledColor := value

value := DateEdit.DisabledColor

The DisabledColor property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	A long value specifying a color value.
Settings

The settings for value are:

Setting	Description
Color Value	A long value describing the color.


DisplayFormat

The DisplayFormat property controls the display format of the date string in the Date Edit control.

Syntax

Visual Basic

DateEdit.DisplayFormat = value

value = DateEdit.DisplayFormat

C++

DateEdit.SetDisplayFormat ( value );

value = DateEdit.GetDisplayFormat ( );

Delphi

DateEdit.DisplayFormat := value

value := DateEdit.DisplayFormat

The DisplayFormat property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	An integer or a predefined constant that represents the style of the DateEdit control text painting.
Settings

The settings for value are:

Setting	Description
0 - pvdNormal	The Date Edit control has the standard  Windows Edit control painting. (default)
1 - pvdFormatted	Formatted  text painting - every character of the text is in a square box.
2 - pvdOdometer	The odometer style text painting - every character is in a rectangle box with shadows: selected background color at the center and black at the bottom and the top.
3 - pvdOdomLight	The odometer style text painting - every character is in a rectangle box with shadows: white at the center and selected background color at the bottom and the top.
4 - pvdOdomInvert	The odometer style painting - every character is in a rectangle box with shadows: black color at the center and selected background at the bottom and the top.
5 - pvdLED	The LED style - characters resemble the Light Emitted Diode display with the selected Background and ForeColors.
6 - pvdLEDBold	The same as LED style but with increased thickness of character lines.


EditMode

This property determines the edit mode of the text.

Syntax

Visual Basic

DateEdit.EditMode = value

value = DateEdit.EditMode

C++

DateEdit.SetEditMode ( value );

value = DateEdit.GetEditMode ( );

Delphi

DateEdit.EditMode := value

value := DateEdit.EditMode

The EditMode property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	A Boolean which represents the edit mode option.
Settings

The settings for value are:

Setting	Description
False	The overwrite edit mode. (default)
True	The insert edit mode.


EditModeChange

This property determines whether or not the user can change the edit mode of the Date Edit control at run time.

Syntax

Visual Basic

DateEdit.EditModeChange = value

value = DateEdit.EditModeChange

C++

DateEdit.SetEditModeChange ( value );

value = DateEdit.GetEditModeChange ( );

Delphi

DateEdit.EditModeChange := value

value := DateEdit.EditModeChange

The EditModeChange property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	A Boolean which represents the permission to change the edit mode.
Settings

The settings for value are:

Setting	Description
False	Does not allow a user to change the edit mode.
True	Allows a user to toggle the edit mode using the Insert key. (default)


HighlightColor

This property determines the color used to paint the background of selected text in the control window.

Syntax

Visual Basic

DateEdit.HighligthColor = value

value = DateEdit.HighligthColor

C++

DateEdit.SetHighligthColor ( value );

value = DateEdit.GetHighligthColor ( );

Delphi

DateEdit.HighlightColor := value

value := DateEdit.HighlightColor

The HighligthColor property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	A long value specifying a color value.
Settings

The settings for value are:

Setting	Description
Color Value	A long value describing the color to paint the Date Edit background of the selected text.


HighlightInverted

This property determines how to paint the selected text and its background.  By turning this property on, highlighted text assumes the inverted colors of the normal text.

Syntax

Visual Basic

DateEdit.HighlightInverted = value

value = DateEdit.HighlightInverted

C++

DateEdit.SetHighlightInverted ( value );

value = DateEdit.GetHighlightInverted ( );

Delphi

DateEdit.HighlightInverted := value

value := DateEdit.HighlightInverted

The HighlightInverted property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	A Boolean which represents an option.
Settings

The settings for value are:

Setting	Description
False	Background of the selected text is painted by the selected HighlightColor. (default)
True	Background and text of the selected text is painted by colors inverted to the original.


Modified

This property is available only at run time and allows checking the Date Edit control to see if it has been modified.  It can also be reset to the unmodified state.

Syntax

Visual Basic

DateEdit.Modified = value

value = DateEdit.Modified

C++

DateEdit.SetModified ( value );

value = DateEdit.GetModified ( );

Delphi

DateEdit.Modified := value

value := DateEdit.Modified

The Modified property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	A Boolean value.
Settings

The settings for value are:

Setting	Description
False	The Date Edit value was not modified since the last time this Modified flag was set to False.
True	The Date Edit value was modified since the last time this Modified flag was set to False.


Month

This property determines the value of the month field in the date.

Syntax

Visual Basic

DateEdit.Month = value

value = DateEdit.Month

C++

DateEdit.SetMonth ( value );

value = DateEdit.GetMonth ( );

Delphi

DateEdit.Month := value

value := DateEdit.Month

The Month property syntax has these parts:

Part	Description
DateEdit	A DateEdit object.
value	An integer that represents month of the year.
Settings

The settings for value are:

Setting	Description
1..12	The 1 represents January, 2 - February, etc.


NullString

This property is the string representation of the Null date while the control does not have focus.

Syntax

Visual Basic

DateEdit.NullString = value

value = DateEdit.NullString

C++

DateEdit.SetNullString(value);

value  = DateEdit.GetNullString();

Delphi

DateEdit.NullString := value

value := DateEdit.NullString

The NullString property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	A text string.
Remarks

The default value is to the .


Separator

This property defines the character used to separate the fields in the date string in case of a short DateFormat (m/d, dd/mm/yy, m/d/yyyy, ...).

Syntax

Visual Basic

DateEdit.Separator = value

value = DateEdit.Separator

C++

DateEdit.SetSeparator(value);

value  = DateEdit.GetSeparator();

Delphi

DateEdit.Separator := value

value := DateEdit.Separator

The Separator property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	A string one character long.
            Remarks

The Separator property is used to separate the month, day and year fields in the string representation of the date when the DateFormat property is set to a short date format (0, 2..13). The Separator can be any character from the following set: /  \  -  ..


SeparatorDefault

This property allows the default Windows date separator character to be used as the separator character, (from the Win.ini file).

Syntax

Visual Basic

DateEdit.SeparatorDefault = value

value = DateEdit.SeparatorDefault

C++

DateEdit.SetSeparatorDefault(value);

value  = DateEdit.GetSeparatorDefault();

Delphi

DateEdit.SeparatorDefault := value

value := DateEdit.SeparatorDefault

The SeparatorDefault property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	A Boolean that represents an option.
Setting	Description
False	The separator between date fields is set to the Separator property (default).
True	The separator between date fields is set to the default Windows date separator (Win.ini file).


Status

This property determines the validity status of the date Value. This property is available only at run time and is read only.

Syntax

Visual Basic

value = DateEdit.Status

C++

value = DateEdit.GetStatus( );

Delphi

value := DateEdit.Status

The Status property syntax has these parts:

Part	Description
DateEdit	A DateEdit object.
value	An integer or a predefined constant that represents the status of the date Value.
Settings

The settings for value are:

Setting	Description
0 - pvdValid	The date is valid.
1 - pvdInvalid	The date is invalid.
2 - pvdNull	The date is Null (not defined).


TimeStore

This property allows a time value to be stored in the DATE structure of the Value property.  If it is set to False, then the time is erased.  The time portion of the date is never displayed with any setting.  It is only available for programming use as a time stamp structure.

Syntax

Visual Basic

DateEdit.TimeStore = value

value = DateEdit.TimeStore

C++

DateEdit.SetTimeStore( value );

value = DateEdit.GetTimeStore( );

Delphi

DateEdit.TimeStore := value

value := DateEdit.TimeStore

The TimeStore property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	A Boolean which represents an option.
Settings

The settings for value are:

Setting	Description
False	The time portion of a DATE structure is erased (set to 12:00:00) from the Value property. (default)
True	The Value property contains time and date.


Value

This property represents the date in the Date Edit control.

Syntax

Visual Basic

DateEdit.Value = value

value = DateEdit.Value

C++

DateEdit.SetValue(value);

value  = DateEdit.GetValue();

Delphi

DateEdit.Value := value

value := DateEdit.Value

The Value property syntax has these parts:

Part	Description
DateEdit	A Date Edit object.
value	A variable of type DATE, (floating point 8 bytes long).
Remarks

The Value property is the default property of the Date Edit control.

Visual Basic Example

Dim value As Date

Rem set the date to December 31, 1996
value = DateSerial(1996, 12, 31)

Rem transfer the date to the ProtoView Date Edit control
DateEdit1.value = value

Dim value As Date
Dim DateDay, DateMonth, DateYear As Integer

Rem retrieve the value from the ProtoView Date Edit
value = DateEdit1.value

Rem retrieve the individual date values
DateDay = Day(value)
DateMonth = Month(value)
DateYear = Year(value)

Visual C++ Example

COleDateTime date;
DATE value;

// set the date to December 31, 1996
date.SetDate(1996, 12, 31);

// store the date in a DATE variable
value = date;

// transfer the date to the ProtoView Date Edit control
m_date.SetValue(value);

COleDateTime date;
DATE value;
int Day, Month, Year;

// retrieve the value from the ProtoView Date Edit
value = m_date.GetValue();
// store the value in a COleDateTime class
date = value;

// use the COleDateTime to retrieve individual items of the date
Day = date.GetDay();
Month = date.GetMonth();
Year = date.GetYear();


ValueReset

This property determines the initial date Value when the Date Edit control is created in a dialog.  Changing the value of this property at run time will automatically reset the Value property of the Date Edit control.

Syntax

Visual Basic

DateEdit.ValueReset = value

value = DateEdit.ValueReset

C++

DateEdit.SetValueReset( value );

value = DateEdit.GetValueReset( );

Delphi

DateEdit.ValueReset:= value

value := DateEdit.ValueReset

The ValueReset property syntax has these parts:

Part	Description
DateEdit	A DateEdit object.
value	An integer or a predefined constant that represents an option.
Settings

The settings for value are:

Setting	Description
0 - pvdCurrent	The Value is set to the current date (default).
1 - pvdCustom	The Value is set to the date defined at design time.
2 - pvdNull	The date Value is set to the Null date.


WeekOfYear

This property is read only and can be used to determine the week of the year for the date.

Syntax

Visual Basic

value = DateEdit.WeekOfYear

C++

value = DateEdit.GetWeekOfYear ( );

Delphi

value := DateEdit.WeekOfYear

The WeekOfYear property syntax has these parts:

Part	Description
DateEdit	A DateEdit object.
value	An integer that represents the week of the year.
Settings

The settings for value are:

Setting	Description
1..53	The 1 represents the first week in the year.


Year

This property determines the value of the year field in the date.

Syntax

Visual Basic

DateEdit.Year = value

value = DateEdit.Year

C++

DateEdit.SetYear ( value );

value = DateEdit.GetYear ( );

Delphi

DateEdit.Year := value

value := DateEdit.Year

The Year property syntax has these parts:

Part	Description
DateEdit	A DateEdit object.
value	An integer that represents the year of the date Value.
Settings

The settings for value are:

Setting	Description
101..9999	The year of the date.


Date Edit Methods

List of Methods

The ProtoView Date Edit control supports the following methods:

AboutBox	SetSelection


SetSelection

Sets the beginning and the end of the selected text string.

Syntax

Visual Basic

object.SetSelection start, end

Visual C++

object.SetSelection(start, end);

Delphi

object.SetSelection(start, end);

The SetSelection method syntax has these parts:

Part	Description
object	A DateEdit object.
start	The beginning of the selection. (short integer)
end	The end of the selection. (short integer)
Remarks

If the start or the end is less than 0, then it automatically adjusted to the 0. If the start or the end is greater than the length of the DateString, then it automatically adjusted to that value. The caret is set to the end of selection.


Date Edit Events

List of Events

The ProtoView Date Edit control supports the following events:

AfterCloseCalendar BeforeOpenCalendar Change Click DblClick GotFocusEvent	KeyDown KeyPress KeyUp LostFocusEvent	MouseDown MouseMove MouseUp


AfterCloseCalendar

The AfterCloseCalendar event is fired after the drop-down calendar was closed.

Syntax

Visual Basic

Private Sub Object_AfterCloseCalendar( )

Visual C++

OnAfterCloseCalendarObject();

Delphi

Procedure AfterCloseCalendar(Sender);


BeforeOpenCalendar

The BeforeOpenCalendar event is fired before the drop-down calendar is opened.

Syntax

Visual Basic

Private Sub Object_BeforeOpenCalendar( )

Visual C++

OnBeforeOpenCalendarObject();

Delphi

Procedure BeforeOpenCalendar(Sender);


BeforeLostFocus

The BeforeLostFocus event is fired before the control loses focus.

Syntax

Visual Basic

Private Sub Object_BeforeLostFocus( )

Visual C++

OnBeforeLostFocusObject();

Delphi

Procedure BeforeLostFocus(Sender);


Change

Occurs when the value of a Calendar control is changed.

Syntax

Visual Basic

Private Sub Object_Change([index As Integer])

Visual C++

void OnChangeObject();

Delphi

Procedure Change(Sender : TObject );

The Change event syntax has these parts:

Part 	Description

Object	An object expression that evaluates to Calendar object.

index	An integer that uniquely identifies a control if it's in a control array.


ProtoView Dial Control

The ProtoView Dial control behaves like the Scrollbar control provided with Windows, but it has a graphical look and feel similar to a stereo dial control.  Its range and turn range can be customized, as well as its direction (clockwise and counterclockwise).

 Dial Properties

 Dial Methods

 Dial Events

The ProtoView Dial can be scaled to any size.


Dial Properties

List of Properties

The ProtoView Dial control supports the following properties:

Direction  Enabled hWnd	MaximumRange  MaximumTurnRange  MinimumRange	MinimumTurnRange  Value


Direction

Returns or sets the direction (clockwise or counter-clockwise) that a Dial control is turned to increase the value.

Syntax

Visual Basic

object.Direction = direction

direction = object.Direction

Visual C++

direction = object.GetDirection();

object.SetDirection(direction);

Delphi

object.Direction := direction;

direction := object.Direction;

The Direction property syntax has these parts:

Part	Description
object	A Dial object.
direction	A short integer which indicates the direction the Dial control is turned to increase its value.
Settings

The settings for direction are:

Setting	Description
0	(Default) Clockwise. Turning the dial control in a clockwise direction will cause the value of the control to increase.
1	Counter Clockwise. Turning the dial control in a clockwise direction will cause the value of the control to decrease.


MaximumRange

Returns or sets the value of the maximum range of the Dial control.  The Value property can never exceed this value.

Syntax

Visual Basic

object.MaximumRange = value

value = object.MaximumRange

Visual C++

value = object.GetMaximumRange();

object.SetMaximumRange(value);

Delphi

object.MaximumRange := value;

value := object.MaximumRange;

The MaximumRange property syntax has these parts:

Part	Description
object	A Dial object.
value	A long integer that represents the largest value that the Dial control can be set to.
Remarks

The Value property must be between the MinimumRange MaximumRange property values.


MaximumTurnRange

Returns or sets the maximum value, in degrees, of the cursor of the Dial control.  The cursor is displayed as a red dot on the Dial control.

Syntax

Visual Basic

object.MaximumTurnRange = value

value = object.MaximumTurnRange

Visual C++

value = object.GetMaximumTurnRange();

object.SetMaximumTurnRange(value);

Delphi

object.MaximumTurnRange := value;

value := object.MaximumTurnRange;

The MaximumTurnRange property syntax has these parts:

Part	Description
object	A Dial object.
value	A long integer that specifies the position, in degrees, that represents the maximum position that the dial can turn.
Remarks

By default, the dial can turn from a range of -45o for the minimum position, to 255o for the maximum position. You may specify any values between -359o to +359o for the minimum and maximum turn range values.


MinimumRange

Returns or sets the value of the minimum range of the Dial control.  The Value property can never fall below this value.

Syntax

Visual Basic

object.MinimumRange = value

value = object.MinimumRange

Visual C++

value = object.GetMinimumRange();

object.SetMinimumRange(value);

Delphi

object.MinimumRange := value;

value := object.MinimumRange;

The MinimumRange property syntax has these parts:

Part	Description
object	A Dial object.
value	A long integer that represents the smallest value that the Dial control can be set to.
Remarks

The Value property must be between the MinimumRange and MaximumRange property values.


MinimumTurnRange

Returns or sets the minimum value, in degrees, of the cursor of the Dial control.  The cursor is displayed as a red dot on the Dial control.

Syntax

Visual Basic

object.MinimumTurnRange = value

value = object.MinimumTurnRange

Visual C++

value = object.GetMinimumTurnRange();

object.SetMinimumTurnRange(long value);

Delphi

object.MinimumTurnRange := value;

value := object.MinimumTurnRange;

The MinimumTurnRange property syntax has these parts:

Part	Description
object	A Dial object.
value	A long integer that specifies the position, in degrees, that represents the minimum position that the dial can turn.
Remarks

By default, the dial can turn from a range of -45o for the minimum position, to 255o for the maximum position. You may specify any values between -359o to +359o for the minimum and maximum turn range values.


Value

Returns or sets the value of the current position of the Dial control.

Syntax

Visual Basic

object.Value = value

value = object.Value

Visual C++

value = object.GetValue();

object.SetValue(value);

Delphi

object.Value := value;

value := object.Value;

The Value property syntax has these parts:

Part	Description
object	A Dial object.
value	A long integer that represents the current position of the Dial control.
Remarks

The value property must be between the MinimumRange and MaximumRange property values.


Dial Methods

List of Methods

The ProtoView Dial control supports the following methods:

AboutBox


Dial Events

List of Events

The ProtoView Dial control supports the following events:

Click DblClick EndScroll  KeyDown KeyPress	KeyUp LineDown  LineUp  MouseDown MouseMove	MouseUp PageDown  PageUp  ThumbPosition  ThumbTrack


EndScroll

Occurs after the user turns the Dial control.

Syntax

Visual Basic

object_EndScroll(Position, TurnDial)

Visual C++

OnEndScrollobject(Position, TurnDial);

Delphi

Procedure EndScroll(Sender, Position, TurnDial);

The EndScroll event syntax has these parts:

Part	Description
Position	A long integer with the new position of the Dial control as a result of the action.
TurnDial	A short integer which can be set to override the Dial control from automatically scrolling..
Settings

The settings for TurnDial are:

Setting	Description
1	(Default)  The Dial control will automatically repaint itself in the new position.
0	The Dial control will not repaint itself in the new position.
Remarks

When the user ends a scrolling action (i.e., releases the mouse, or releases an scrolling key) this event is sent.


LineDown

Occurs when the user presses the Down Arrow key while the Dial control has input focus or clicks the button on the dial with the minus symbol on it.

Syntax

Visual Basic

object_LineDown(Position)

Visual C++

OnLineDownobject(Position);

Delphi

Procedure LineDown(Sender, Position);

The LineDown event syntax has these parts:

Part	Description
Position	A long integer with the new position of the Dial control as a result of the action.
TurnDial	A short integer which can be set to override the Dial control from automatically scrolling..
Settings

The settings for TurnDial are:

Setting	Description
1	(Default)  The Dial control will automatically repaint itself in the new position.
0	The Dial control will not repaint itself in the new position.


LineUp

Occurs when the user presses the Up Arrow key while the Dial control has input focus or clicks the button on the dial with the plus symbol on it.

Syntax

Visual Basic

object_LineUp(Position, TurnDial)

Visual C++

OnLineUpobject(Position, TurnDial);

Delphi

Procedure LineUp(Sender, Position);

The LineUp event syntax has these parts:

Part	Description
Position	A long integer with the new position of the Dial control as a result of the action.
TurnDial	A short integer which can be set to override the Dial control from automatically scrolling..
Settings

The settings for TurnDial are:

Setting	Description
1	(Default)  The Dial control will automatically repaint itself in the new position.
0	The Dial control will not repaint itself in the new position.


PageDown

Occurs when the user presses the Page Down key while the Dial control has input focus or clicks between the red dot representing the current Value and the Minimum Turn Range.

Syntax

Visual Basic

object_PageDown(Position, TurnDial)

Visual C++

OnPageDownobject(Position, TurnDial);

Delphi

Procedure PageDown(Sender, Position, TurnDial);

The PageDown event syntax has these parts:

Part	Description
Position	A long integer with the new position of the Dial control as a result of the action.
TurnDial	A short integer which can be set to override the Dial control from automatically scrolling..
Settings

The settings for TurnDial are:

Setting	Description
1	(Default)  The Dial control will automatically repaint itself in the new position.
0	The Dial control will not repaint itself in the new position.


PageUp

Occurs when the user presses the Page Up key while the Dial control has input focus or clicks between the red dot representing the current Value and the Maximum Turn Range.

Syntax

Visual Basic

object_PageUp(Position, TurnDial)

Visual C++

OnPageUpobject(Position, TurnDial);

Delphi

Procedure PageUp(Sender, Position, TurnDial);

The PageUp event syntax has these parts:

Part	Description
Position	A long integer with the new position of the Dial control as a result of the action.
TurnDial	A short integer which can be set to override the Dial control from automatically scrolling..
Settings

The settings for TurnDial are:

Setting	Description
1	(Default)  The Dial control will automatically repaint itself in the new position.
0	The Dial control will not repaint itself in the new position.


ThumbPosition

Occurs when the user releases the mouse after turning the Dial control.

Syntax

Visual Basic

object_ThumbPosition(Position, TurnDial)

Visual C++

OnThumbPositionobject(Position, TurnDial);

Delphi

Procedure ThumbPosition(Sender, Position, TurnDial);

The ThumbPosition event syntax has these parts:

Part	Description
Position	A long integer with the new position of the Dial control as a result of the action.
TurnDial	A short integer which can be set to override the Dial control from automatically scrolling..
Settings

The settings for TurnDial are:

Setting	Description
1	(Default)  The Dial control will automatically repaint itself in the new position.
0	The Dial control will not repaint itself in the new position.
Remarks

The Dial control sends a ThumbTrack event each time the position of the Dial control changes as a result of mouse movement. The ThumbTrack event occurs many times as the user turns the dial with the mouse, as opposed to the ThumbPosition event, which only occurs once, when the user releases the mouse.


ThumbTrack

Occurs when the user turns the Dial control with the mouse.

Syntax

Visual Basic

object_ThumbTrack(Position, TurnDial)

Visual C++

OnThumbTrackobject(Position, TurnDial);

Delphi

Procedure ThumbTrack(Sender, Position, TurnDial);

The ThumbTrack event syntax has these parts:

Part	Description
Position	A long integer with the new position of the Dial control as a result of the action.
TurnDial	A short integer which can be set to override the Dial control from automatically scrolling..
Settings

The settings for TurnDial are:

Setting	Description
1	(Default)  The Dial control will automatically repaint itself in the new position.
0	The Dial control will not repaint itself in the new position.
Remarks

The Dial control sends a ThumbTrack event each time the position of the Dial control changes as a result of mouse movement. The ThumbTrack event occurs many times as the user turns the dial with the mouse, as opposed to the ThumbPosition event, which only occurs once, when the user releases the mouse.


ProtoView Font Selection Control

The ProtoView Font Selection control enumerates all the font families available on a machine and displays them in a combobox, along with available point sizes.  This provides a quick way for uses to select a font type face and size to display other controls with.  Once a font is selected the Font Selection control can return an instance of that font.

 Font Selection Properties

 Font Selection Methods

 Font Selection Events

The Font Selection control with the font name and point size lists dropped down.


Font Selection Properties

List of Properties

The ProtoView Font Selection control supports the following properties:

Appearance BorderStyle	Enabled Font	hWnd


Font Selection Methods

List of Methods

The ProtoView Font Selection control supports the following methods:

AboutBox GetFontHeight  GetFontName	GetPointSize  SetFontHeight  SetFontName	SetItemHeight  SetPointSize


GetFontHeight

Returns the height of the font, in pixels, corresponding to the point size displayed in the control.

Syntax

Visual Basic

height = object.GetFontHeight()

Visual C++

height = object.GetFontHeight();

Delphi

height = object.GetFontHeight;

The GetFontHeight method syntax has these parts:

Part	Description
object	A FontSelection object.
height	A short integer which identifies the height of the font.
Returns

This method returns the height of the font, in pixels, corresponding to the point size displayed in the FontSelection control.


GetFontName

Returns the named font displayed in the FontSelection control.

Syntax

Visual Basic

name = object.GetFontName()

Visual C++

name =  object.GetFontName();

Delphi

name = object.GetFontName;

The GetFontName method syntax has these parts:

Part	Description
object	A FontSelection object.
name	A string which contains the font name.
Returns

This method returns the string that represents the named font displayed in the FontSelection control.


GetPointSize

Returns the point size displayed in the control.

Syntax

Visual Basic

size = object.GetPointSize()

Visual C++

size = object.GetPointSize();

Delphi

size = object.GetPointSize;

The GetPointSize method syntax has these parts:

Part	Description
object	A FontSelection object.
size	A short integer which contains the font size.
Returns

This method returns the point size displayed in the FontSelection control.


SetFontHeight

Sets the height of the font, in pixels, corresponding to the point size displayed in the control.

Syntax

Visual Basic

object.SetFontHeight(fontheight)

Visual C++

object.SetFontHeight(fontheight);

Delphi

object.SetFontHeight(fontheight);

The SetFontHeight method syntax has these parts:

Part	Description
object	A FontSelection object.
fontheight	A short integer which contains the height of the font in pixels. This value will be converted to point size and displayed in the FontSelection control.
Returns

This method does not return a value.


SetItemHeight

Sets the height of the items in a FontSelection control.

Syntax

Visual Basic

object.SetItemHeight(itemheight)

Visual C++

object.SetItemHeight(itemheight);

Delphi

object.SetItemHeight(itemheight);

The SetItemHeight method syntax has these parts:

Part	Description
object	A FontSelection object.
itemheight	A short integer which contains the height of the items, in pixels displayed in the FontSelection control.
Returns

This method does not return a value.


SetFontName

Sets the named font displayed in the FontSelection control.

Syntax

Visual Basic

object.SetFontName(fontname)

Visual C++

object.SetFontName(fontname);

Delphi

object.SetFontName(fontname );

The SetFontName method syntax has these parts:

Part	Description
object	A FontSelection object.
fontname	A string with the named font to be displayed in the FontSelection control.
Returns

This method does not return a value.


SetPointSize

Sets the point size displayed in the control.

Syntax

Visual Basic

object.SetPointSize(pointsize)

Visual C++

object.SetPointSize(pointsize);

Delphi

object.SetPointSize(pointsize);

The SetPointSize method syntax has these parts:

Part	Description
object	A FontSelection object.
pointsize	A short integer with the point size to be displayed in the FontSelection control.
Returns

This method does not return a value.


Font Selection Events

List of Events

The ProtoView Font Selection control supports the following events:

Click FontNameChange  KeyDown	KeyPress KeyUp MouseDown	MouseMove MouseUp PointSizeChange


FontNameChange

Occurs when the user changes the named font in the FontSelection control.

Syntax

Visual Basic

Private Sub Object_FontNameChange( )

Visual C++

OnFontNameChangeObject();

Delphi

Procedure FontNameChange(Sender);


PointSizeChange

Occurs when the user changes the point size in the FontSelection control.

Syntax

Visual Basic

Private Sub Object_PointSizeChange( )

Visual C++

OnPointSizeChangeObject();

Delphi

Procedure PointSizeChange(Sender);


Line3D Control
ProtoView Line3D Control

The ProtoView Line3D control is used to draw various kinds of lines within a form or dialog.   It is used to create a better visual appearance and to better organize the content of the dialog.  The Line3D control behaves like a static text (label), that means it does not respond on any keyboard entries or mouse button click and is not able to get focus.  It supports lines with various pen styles, 3D effects, orientation, width and color. The color of the shadowed line and its horizontal and vertical offset from the main line can also be adjusted.

 Line3D Properties

 Line3D Methods

 Line3D Events

Example of the Line3D control.


Line3D Properties

List of Properties

The ProtoView Line3D control supports the following properties:

ForeColor LineOrientation LineStyle (Default)	LineWidth ShadowColor ShadowHorizontal	ShadowVertical WidthToRectShape


LineStyle

This property determines the style of the pen used to draw the line.

Syntax

Visual Basic

Line.LineStyle = value

value = Line.LineStyle

C++

Line.SetLineStyle ( value );

value = Line.GetLineStyle ( );

Delphi

Line.LineStyle := value

value := Line.LineStyle

The LineStyle property syntax has these parts:

Part	Description
Line	A Line3D object.
value	An integer or predefined constant that specifies the style of the pen used to draw the line.
Settings

The settings for value are:

Setting	Description
0 - pvlSolid	Solid line.
1 - pvlDash	Line consists of long dash lines.
2 - pvlDot	Line consists of short dash lines.
3 - pvlDashDot	Line consists of sets of long and short dashes.
4 - pvlDash2Dot	Line consists of sets of one long and two short dashes.
5 - pvlNull	Line is invisible.


LineWidth

This property determines the width of the line.

Syntax

Visual Basic

Line.LineWidth = value

value = Line.LineWidth

C++

Line.SetLineWidth ( value );

value = Line.GetLineWidth ( );

Delphi

Line.LineWidth := value

value := Line.LineWidth

The LineWidth property syntax has these parts:

Part	Description
Line	A Line3D object.
value	An integer value specifying the width of the line.
Settings

The settings for value are:

Setting	Description
Integer 1..100	The width of the line in pixels.


LineOrientation

This property determines the orientation of the line inside of the control window.

Syntax

Visual Basic

Line.LineOrientation = value

value = Line.LineOrientation

C++

Line.SetLineOrientation ( value );

value = Line.GetLineOrientation ( );

Delphi

Line.LineOrientation := value

value := Line.LineOrientation

The LineOrientation property syntax has these parts:

Part	Description
Line	A Line3D object.
value	An integer value or a predefined constant indicating the line direction.
Settings

The settings for value are:

Setting	Description
0 - pvlHorizontal	Horizontal line between left and right sides of the control.
1 - pvlVertical	Vertical line between top and bottom sides of the control.
2 - pvlDiagonalLT	Line between left-top and right-bottom corners.
3 - pvlDiagonalLB	Line between left-bottom and right-top corners.


ShadowColor

This property determines the color of the shadow line.

Syntax

Visual Basic

Line.ShadowColor = value

value = Line.ShadowColor

C++

Line.SetShadowColor ( value );

value = Line.GetShadowColor ( );

Delphi

Line.ShadowColor := value

value := Line.ShadowColor

The ShadowColor property syntax has these parts:

Part	Description
Line	A Line3D object.
value	A long value specifying the color of the shadow line.
Settings

The settings for value are:

Setting	Description
Color Value	A long value describing the color of the shadow line.  This color can be set using RGB color values.


ShadowHorizontal

This property determines the horizontal shift of the shadow from the main line.

Syntax

Visual Basic

Line.ShadowHorizontal = value

value = Line.ShadowHorizontal

C++

Line.SetShadowHorizontal ( value );

value = Line.GetShadowHorizontal ( );

Delphi

Line.ShadowHorizontal := value

value := Line.ShadowHorizontal

The ShadowHorizontal property syntax has these parts:

Part	Description
Line	A Line3D object.
value	An integer value specifying the horizontal shift of the shadow from the line.
Settings

The settings for value are:

Setting	Description
-50..+50	The horizontal shift of shadow from the line in pixels.


ShadowVertical

This property determines the vertical shift of the shadow from the main line.

Syntax

Visual Basic

Line.ShadowVertical = value

value = Line.ShadowVertical

C++

Line.SetShadowVertical ( value );

value = Line.GetShadowVertical ( );

Delphi

Line.ShadowVertical := value

value := Line.ShadowVertical

The ShadowVertical property syntax has these parts:

Part	Description
Line	A Line3D object.
value	An integer value specifying the vertical shift of the shadow from the line.
Settings

The settings for value are:

Setting	Description
-50..+50	The vertical shift of shadow from the line in pixels.


WidthToRectShape

This property determines the appearance of a diagonal line when its width is greater then 1.  In particular, it allows for a choice as to how the endpoints of a diagonal line will be drawn as described in Settings below.

Syntax

Visual Basic

Line.WidthToRectShape = value

value = Line.WidthToRectShape

C++

Line.SetWidthToRectShape ( value );

value = Line.GetWidthToRectShape ( );

Delphi

Line.WidthToRectShape := value

value := Line.WidthToRectShape

The WidthToRectShape property syntax has these parts:

Part	Description
Line	A Line3D object.
value	A Boolean which represents an option.
Settings

The settings for value are:

Setting	Description
False	The width of a diagonal line is built with a 45 degree angle slope. If the width of the control window is equal its height, then the shape of the line is  rectangle, but in any other case the shape will be that of a parallelogram.
True	The width of a diagonal line is built with a 90 degree angle slope. In this case the line with any orientation has a rectangle shape.


Line3D Methods

List of Methods

The ProtoView Line3D control supports the following methods:

AboutBox


Line3D Events

List of Events

The Line3D control does not fire any Events


ProtoView Marquee Control

The ProtoView Marquee control is a read-only control for displaying text and images in a scrolling view.  With the Marquee control you can alter colors, fonts, and intermingle text and images.  The speed which the Marquee control scrolls the image can be varied, halted, and replaced.

 Displaying Images

 Marquee Properties

 Marquee Methods

 Marquee Events

Example of the Marquee contro with different fonts, colors and mixing picture with text.


Displaying Images

Introduction

The ProtoView Marquee control is capable of displaying a wide range of effects which include text using different fonts, pictures, and different colors.  These values are specified by setting properties on the Marquee control and inserting special values in the text displayed by the control.

Displaying Text

If you set the Text property without any special characters, the text will be displayed verbatim, including carriage returns.

Changing Fonts

The Marquee control has four font properties which can be set at design time or runtime.  Changing the font displayed by the Marquee control is a two step process.  You must first set one of three properties on the Marquee control called Heading1 to Heading5.

Each of these represent a specific font property on the Marquee control.  To change the font used to display the text, insert one of the following values in the text when setting the Text property:

This <H 1>text <H 2>is displayed using <H 3>three fonts.

The Marquee control also supports a Font property which is the default font used by the Marquee control if no font symbols are inserted into the text.  If you want to restore the font to this default font, use <H 0>.  The table below lists all the font symbols which can be inserted into the text.

<H 0>	The default font set in the property Font.
<H 1>	The font set in the property Heading1.
<H 2>	The font set in the property Heading2.
<H 3>	The font set in the property Heading3.
<H 4>	The font set in the property Heading4.
<H 5>	The font set in the property Heading5.
Dislaying Pictures

The Marquee control has nine picture properties which can be set at design time or runtime.  Displaying a picture in the Marquee control is a two step process.  You must first set one of three properties on the Marquee control called Picture1 to Picture9.

Each of these represents a specific picture property on the Marquee control.  To display a picture, insert one of the following values in the text when setting the Text property:

This is one picture: <IMG 1>.  This is another picture: <IMG 2>.

<IMG 1>	The picture set in the Picture1 property.
<IMG 2>	The picture set in the Picture2 property.
<IMG 3>	The picture set in the Picture3 property.
<IMG 4>	The picture set in the Picture4 property.
<IMG 5>	The picture set in the Picture5 property.
<IMG 6>	The picture set in the Picture6 property.
<IMG 7>	The picture set in the Picture7 property.
<IMG 8>	The picture set in the Picture8 property.
<IMG 9>	The picture set in the Picture9 property.
If a picture property is set using a bitmap, the Marquee control will display the bitmap in a transparent mode.  The color which is used as the transparent color is the color of the upper left corner of the bitmap image.

Changing Colors

The Marquee control supports the ForeColor and BackColor property.  You can also change the color used to display text by inserting a special value which represents an RGB value.

This text is <COLOR R192G192B192>grey.

The special token is <COLOR >.  Then there are three values which can be set individually - R, G and B.  The value for each can be in the range 0 - 255.  You do not have to specify a value for all three colors.  Red can be set as <COLOR R255G0B0>, or just <COLOR R255>.


Marquee Properties

List of Properties

The ProtoView Marquee control exposes the following list of properties:

BackColor Direction Font ForeColor Frame	FreezeMarquee Heading1 - 5  hWnd Justification NextDisplayString	Picture1 - 9 Redraw Text TickIncrement TickTime


Direction

This property determines the direction the Marquee control scrolls its image.

Syntax

Visual Basic

Marquee.Direction = value

value = Marquee.Direction

C++

Marquee.SetDirection ( value );

value = Marquee.GetDirection ( );

Delphi

Marquee.Direction := value;

value := Marquee.Direction;

The Direction property syntax has these parts:

Part	Description
Marquee	A Marquee object.
value	A long which represents the direction to scroll the Marquee control.
Settings

The settings for value are:

Setting	Description
RightToLeft - 0	The Marquee control will scroll from right to left.
LeftToRight - 1	The Marquee control will scroll from left to right.
TopToBottom - 2	The Marquee control will scroll from top to bottom.
BottomToTop - 3	The Marquee control will scroll from bottom to top.


Frame

This property determines the type of border to draw around the Marquee control.

Syntax

Visual Basic

Marquee.Frame = value

value = Marquee.Frame

C++

Marquee.SetFrame ( value );

value = Marquee.GetFrame ( );

Delphi

Marquee.Frame := value;

value := Marquee.Frame;

The Frame property syntax has these parts:

Part	Description
Marquee	A Marquee object.
value	A long which represents the type of border to draw around the Marquee control.
Settings

The settings for value are:

Setting	Description
None - 0	No 3D effect.
FrameLightIndent - 1	A light indent will be drawn.
FrameHeavyIndent - 2	A heavy indent will be drawn.
Frame Indent - 3	An indented frame will be drawn.
FrameHeavyOutdent - 4	A heavy frame will be drawn.
FrameShadow - 5	A shadow will be drawn.


FreezeMarquee

This property determines if the Marquee control will scroll its image.

Syntax

Visual Basic

Marquee.FreezeMarquee = value

value = Marquee.FreezeMarquee

C++

Marquee.SetFreezeMarquee ( value );

value = Marquee.GetFreezeMarquee ( );

Delphi

Marquee.FreezeMarquee := value;

value := Marquee.FreezeMarquee;

The FreezeMarquee property syntax has these parts:

Part	Description
Marquee	A Marquee object.
value	A Boolean which determines if the Marquee control will stop scrolling.
Settings

The settings for value are:

Setting	Description
TRUE	The Marquee control will scroll its image in the direction specified by the Direction property.
FALSE	The Marquee control will not scroll its image.  The image will freeze in the exact spot it was last painted.


Heading1 - 5

The Marquee control supports three font properties named Heading1 through Heading5.  Each represents a different font which can be assigned to and displayed by the Marquee control.  These fonts are in addition to the Font property, which represents a default font for the Marquee control.

Syntax

Visual Basic

Marquee.Heading1 = Font

Font = Marquee.Heading1

C++

Marquee.SetHeading1 ( Font );

Font = Marquee.GetHeading1 ( );

Visual Basic

Marquee.Heading1 := Font;

Font := Marquee.Heading1;

The Heading1 - 5 properties syntax have these parts:

Part	Description
Marquee	A Marquee object.
Font	A font object.


Justification

This property determines the justification of the text and images displayed inside the Marquee control.

Syntax

Visual Basic

Marquee.Justification = value

value = Marquee.Justification

C++

Marquee.SetJustification( value );

value = Marquee.GetJustification( );

Delphi

Marquee.Justification := value;

value := Marquee.Justification;

The Justification property syntax has these parts:

Part	Description
Marquee	A Marquee object.
value	A long which represents the justification of the text and pictures when drawn by the Marquee control.
Settings

The settings for value are:

Setting	Description
LeftOrTop - 0	Left/Top - If the Marquee control is scrolling horizontally, text and pictures will align along the top edge of the control.  If the Marquee control is scrolling vertically, text and pictures will align along the left edge of the control.
Centered - 1	Centered - The Marquee control will align pictures and text to be centered in the control.
RightOrBottom - 2	Right/Bottom - If the Marquee control is scrolling horizontally, text and pictures will align along the bottom edge of the control.  If the Marquee control is scrolling vertically, text and pictures will align along the right edge of the control.


NextDisplayString

This property sets the next string of text displayed by the Marquee control.  If you set the Text property directly, any item currently displayed by the Marquee control will be erased and replaced by the new text, often when it is in the middle of scrolling the text.  This can cause unnecessary flicker.  This property allows you to specify a new string to be displayed by the Marquee control after the current token has been completely displayed and scrolled out of view.  This leads to smooth transition between display tokens.

 Syntax

Visual Basic

Marquee.NextDisplayString = value

value = Marquee.NextDisplayString

C++

Marquee.SetNextDisplayString( value );

value = Marquee.GetNextDisplayString ( );

Delphi

Marquee.NextDisplayString := value;

value := Marquee.NextDisplayString;

The NextDisplayString property syntax has these parts:

Part	Description
Marquee	A Marquee object.
value	A string which is used to set or retrieve the value of the text displayed by the Marquee control immediately after the current text is displayed.


Picture1 - 9

The Marquee control supports nine picture properties named Picture1 through Picture9.  Each represents a different picture which can be assigned to and displayed by the Marquee control.

Syntax

Visual Basic

Marquee.Picture1 = value

value = Marquee.Picture1

C++

Marquee.SetPicture1 ( value );

value = Marquee.GetPicture1 ( );

Delphi

Marquee.Picture1 := value;

value := Marquee.Picture1;

The Picture1 - 9 properties syntax have these parts:

Part	Description
Marquee	A Marquee object.
value	A picture object.


Redraw

This property determines if the Marquee control will repaint itself.  This property is useful if a container will set several properties on the Marquee control simultaneously and does not want the Marquee control to repaint after each change.  Setting this property to TRUE will cause the Marquee control to refresh itself.

Syntax

Visual Basic

Marquee.Redraw = value

value = Marquee.Redraw

C++

Marquee.SetRedraw ( value );

value = Marquee.GetRedraw ( );

Delphi

Marquee.Redraw := value;

value := Marquee.Redraw;

The Redraw property syntax has these parts:

Part	Description
Marquee	A Marquee object.
value	A Boolean which determines if the Marquee control will repaint itself.
Settings

The settings for value are:

Setting	Description
TRUE	The Marquee control will repaint itself when necessary.
FALSE	The Marquee control will not repaint itself even when the system requests the control to paint itself.


Text

This property sets or returns the text displayed by the Marquee control.

Syntax

Visual Basic

Marquee.Text = value

value = Marquee.Text

C++

Marquee.SetText ( value );

value = Marquee.GetText ( );

Delphi

Marquee.Text := value;

value := Marquee.Text;

The Text property syntax has these parts:

Part	Description
Marquee	A Marquee object.
value	A string which is used to set or retrieve the value of the text displayed by the Marquee control.


TickIncrement

This property determines the amount to scroll the image inside the Marquee control each time the image is scrolled.

Syntax

Visual Basic

Marquee.TickIncrement = value

value = Marquee.TickIncrement

C++

Marquee.SetTickIncrement ( value );

value = Marquee.GetTickIncrement ( );

Visual Basic

Marquee.TickIncrement := value;

value := Marquee.TickIncrement;

The TickIncrement property syntax has these parts:

Part	Description
Marquee	A Marquee object.
value	A short which represents the number of pixels to scroll the Marquee control.
Settings

The settings for value must fall in the range 1 through 10.


TickTime

This property determines the speed (in milleseconds) at which the Marquee control scrolls its image.

Syntax

Visual Basic

Marquee.TickTime = value

value = Marquee.TickTime

C++

Marquee.SetTickTime ( value );

value = Marquee.GetTickTime ( );

Delphi

Marquee.TickTime := value

value := Marquee.TickTime

The TickIncrement property syntax has these parts:

Part	Description
Marquee	A Marquee object.
value	A short which represents how often the Marquee control will scroll its image.
Settings

The settings for value must fall in the range 50 through 5000.  This value is in milleseconds, so 1000 represents one scroll per second, 100 represents 10 scrolls per second, and 5000 represents one scroll every 5 seconds.


Marquee Methods

List of Methods

The ProtoView Marquee control exposes the following list of methods:

AboutBox


Marquee Events

List of Events

The ProtoView Marquee control fires the following events:

Click DblClick	FinishedDisplay MouseDown	MouseMove MouseUp


FinishedDisplay

The FinishedDisplay event is fired whenever the current image in the Marquee control has been completely shown and scrolled out of view.  It provides an event to change the image in the Marquee control without flickering the image in the marquee control.

Syntax

Visual Basic

Private Sub Object_FinishedDisplay( )

Visual C++

void OnFinishedDisplayObject();

Delphi

Procedure FinishedDisplay (Sender : TObject );


ProtoView MaskEdit Control

 The ProtoView MaskEdit control is an ActiveX control which extends the capabilities of the standard Windows Edit control. The MaskEdit control is designed to edit text strings according to a predefined format. When the Mask property is disabled, it behaves like an Edit control, otherwise it checks how keyboard or clipboard entries fit into the mask and allows or prohibits the modification of the control text string.  In addition to the standard Edit control features the control has

	The ability to set mask values that control what characters can be entered and how they will be formatted.
	2 edit modes,- insert and overwrite.
	7 types of display styles,- regular, formatted, odometer, odometer light, odometer inverted, LED, LED bold.
	Custom highlight and disabled text colors.
	Automatic vertical alignment of the text at the center of the control              window.

 Tips for Using the MaskEdit Control

 MaskEdit Properties

 MaskEdit Methods

 MaskEdit Events

Example of the ProtoView Mask Edit control.


Tips for using the  MaskEdit Control

1.	If the length of the Mask string is not equal to zero, then the length of the controls text string is limited by the number of available positions in the Mask (# @ * characters). For example, a Mask of *** will allow the user to enter no more then 3 characters, and a Mask  of Any text 123 will allow no entry at all.  Any entry that does not fit in the Mask will be disabled and the MaskEdit control will generate a Beep.
2.	If the length of the Mask string is greater than zero, then data copied to the clipboard from selected MaskEdit text is defined by a combination of the CopyEmptyMask and CopyTextAndMask properties.
3.	If the length of the Mask string is greater than zero, then setting the Text property from code at run time will extract from a string only characters that fit into the available positions of the Mask.  Bad characters will be skipped and corresponding positions will remain unfilled.
4.	The TextWithMask property is bindable and can be used to connect the MaskEdit control to a data base field. Since this property actually combines the Text and the Mask properties, writing and reading to this property are different and the data base connection can be in some cases confusing. The following conditions should be considered: while writing to the MaskEdit control from a data base, the only characters that fit into the Mask will be extracted from the original data base field  and they will fill the Text property from left to right. The Mask property can not be modified by the data base field. While reading from the MaskEdit control and corresponding writing to a data base field, the whole text string will be copied as it appears in the MaskEdit control.  For example, if the data base field contains string: (123) 456-7890 and the Mask is set to (###) ###-####, then the TextWithMask will look like (123) 456-7890 and the MaskEdit control will have the data exchange with data base field as it is axpected. In any case, it is advisable to test actual behavior of the data exchange.
5.	The Odometer and LED display styles override all default Windows painting colors except for the disabled text color.  If you want to use system colors, you should set them at design time from the combobox System Colors on the Colors Page.  To set them at run time, use system color values when setting the color properties.
6.	For the Odometer display styles, set the HightlightInverted to True to get the most contrast for highlight colors.
7.	For  better appearance of the MaskEdit control, it is advisable to use the High Colors (16 bits, or 64K colors) display setting, when using  the Odometer display styles.
8.	For the LED display styles, the width of characters is calculated at runtime and depends on the height of the control window. For better alignment of the last visible character on the right side of the control window, it is advisable at design time to temporarily fill the control with a long text string and adjust the width of the MaskEdit control window accordingly.


MaskEdit Properties

List of Properties

The ProtoView MaskEdit supports the following properties:

Alignment Autoscroll BorderStyle CanUndo CopyEmptyMask CopyTextAndMask DisplayFormat	EditMode EditModeChange HighlightColor HighlightInverted Mask Modified PromptCharacter	ReadOnly SelectionPersistance Text (Default) TextDisabled TextWithMask


Alignment

This property determines the horizontal alignment of the text when the control does not have the input focus.

Syntax

Visual Basic

MaskEdit.Alignment = value

value = MaskEdit.Alignment

C++

MaskEdit.SetAlignment ( value );

value = MaskEdit.GetAlignment ( );

Delphi

MaskEdit.Alignment := value

value := MaskEdit.Alignment

The Alignment property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	An integer or a predefined constant that represents the horizontal alignment of the text inside of the control window.
Settings

The settings for value are:

Setting	Description
0 - pvmLeft	The alignment of the text is left justified. (default)
1 - pvmCenter	The text is centered.
2 - pvmRight	The alignment of the text is right justified.


Autoscroll

 This property allows the text to automatically scroll horizontally while editing the MaskEdit control text when the text length is longer than the control width.

Syntax

Visual Basic

MaskEdit.Autoscroll = value

value = MaskEdit.Autoscroll

C++

MaskEdit.SetAutoscroll ( value );

value = MaskEdit.GetAutoscroll ( );

Delphi

MaskEdit.Autoscroll := value

value := MaskEdit.Autoscroll

The Autoscroll property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	A Boolean which represents an option.
Settings

The settings for value are:

Setting	Description
False	No autoscroll.
True	Horizontal autoscroll while editing the text. (default)


CanUndo

This property is available at run time and can be used to determine if the last change to the Text  property can be undone or not.

Syntax

Visual Basic

value = MaskEdit.CanUndo

C++

value = MaskEdit.GetCanUndo ( );

Delphi

value := MaskEdit.CanUndo

The CanUndo property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	A Boolean value.
Settings

The settings for value are:

Setting	Description
False	The Text property was not modified or changes can not be undone.
True	The Text property was modified and the last change can be undone.


CopyEmptyMask

This property determines what to do with empty (not filled) mask character positions when selected text is copied to the clipboard.

Syntax

Visual Basic

MaskEdit.CopyEmptyMask = value

value = MaskEdit.CopyEmptyMask

C++

MaskEdit.SetCopyEmptyMask  ( value );

value = MaskEdit.GetCopyEmptyMask ( );

Delphi

MaskEdit.CopyEmptyMask := value

value := MaskEdit.CopyEmptyMask

The CopyEmptyMask property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	A Boolean which represents an option.
Settings

The settings for value are:

Setting	Description
False	Empty mask character positions are skipped and only the valid text portion is copied to the clipboard. (default)
True	Empty mask character positions are replaced by the Space character.


CopyTextAndMask

This property determines what part of the selected text string will be copied to the clipboard on the Copy to Clipboard operation (Ctrl C).

Syntax

Visual Basic

MaskEdit.CopyTextAndMask = value

value = MaskEdit.CopyTextAndMask

C++

MaskEdit.SetCopyTextAndMask ( value );

value = MaskEdit.GetCopyTextAndMask ( );

Delphi

MaskEdit.CopyTextAndMask := value

value := MaskEdit.CopyTextAndMask

The CopyTextAndMask property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	A Boolean which represents an option.
Settings

The settings for value are:

Setting	Description
False	Copy to the clipboard the selected text only (default).
True	Copy to the clipboard selected text and mask.


DisplayFormat

This property determines the painting style of the control window.

Syntax

Visual Basic

MaskEdit.DisplayFormat = value

value = MaskEdit.DisplayFormat

C++

MaskEdit.SetDisplayFormat ( value );

value = MaskEdit.GetDisplayFormat ( );

Delphi

MaskEdit.DisplayFormat := value

value := MaskEdit.DisplayFormat

The DisplayFormat property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	An integer or a predefined constant that represents the painting style.
Settings

The settings for value are:

Setting	Description
0 - pvmNormal	The control has the standard  Windows Edit control painting. (default)
1 - pvmFormatted	Formatted  text painting - every character of the text is in a square box.
2 - pvmOdometer	The odometer style text painting - every character is in a rectangle box with shadows: selected background color at the center and black at the bottom and the top.
3 - pvmOdomLight	The odometer style text painting - every character is in a rectangle box with shadows: white at the center and selected background color at the bottom and the top.
4 - pvmOdomInvert	The odometer style painting - every character is in a rectangle box with shadows: black color at the center and selected background at the bottom and the top.
5 - pvmLED	The LED style - characters resemble the Light Emitted Diode display with the selected Background and ForeColor values.
6 - pvmLEDBold	The same as LED style, but with increased thickness of character lines.


EditMode

This property determines whether editing is done with overwrite or insert mode.

Syntax

Visual Basic

MaskEdit.EditMode = value

value = MaskEdit.EditMode

C++

MaskEdit.SetEditMode ( value );

value = MaskEdit.GetEditMode ( );

Delphi

MaskEdit.EditMode := value

value := MaskEdit.EditMode

The EditMode property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	A Boolean which represents the edit mode option.
Settings

The settings for value are:

Setting	Description
False	The overwrite edit mode. (default)
True	The insert edit mode.


EditModeChange

 This property determines whether or not the user can change the edit mode of the MaskEdit control at run time using the Insert key.

Syntax

Visual Basic

MaskEdit.EditModeChange = value

value = MaskEdit.EditModeChange

C++

MaskEdit.SetEditModeChange ( value );

value = MaskEdit.GetEditModeChange ( );

Delphi

MaskEdit.EditModeChange := value

value := MaskEdit.EditModeChange

The EditModeChange property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	A Boolean which represents the permission to change the edit mode.
Settings

The settings for value are:

Setting	Description
False	Does not allow the user to change the edit mode.
True	Allows the user to toggle the edit mode using the Insert key. (default)


HighlightColor

This property determines the color used to paint the background of selected text.

Syntax

Visual Basic

MaskEdit.HighligthColor = value

value = MaskEdit.HighligthColor

C++

MaskEdit.SetHighligthColor ( value );

value = MaskEdit.GetHighligthColor ( );

Delphi

MaskEdit.HighligthColor := value

value := MaskEdit.HighligthColor

The HighligthColor property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	A long value specifying a HighlightColor.
Settings

The settings for value are:

Setting	Description
Color Value	A long value or a system color describing the color to paint the background of selected text.  It can be created using the RGB function.


HighlightInverted

 This property determines how to paint the selected text and its background.  By turning this property on, highlighted text assumes the inverted colors of the normal text.

Syntax

Visual Basic

MaskEdit.HighlightInverted = value

value = MaskEdit.HighlightInverted

C++

MaskEdit.SetHighlightInverted ( value );

value = MaskEdit.GetHighlightInverted ( );

Delphi

MaskEdit.HighlightInverted := value

value := MaskEdit.HighlightInverted

The HighlightInverted property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	A Boolean which represents an option.
Settings

The settings for value are:

Setting	Description
False	Background of the selected text is painted by the selected HighlightColor. (default)
True	Background and text of the selected text is painted by the colors inverted to the original screen values.


Mask

This property determines the mask string used for entering text.

Syntax

Visual Basic

MaskEdit.Mask = value

value = MaskEdit.Mask

C++

MaskEdit.SetMask ( value );

value = MaskEdit.GetMask ( );

Delphi

MaskEdit.Mask := value

value := MaskEdit.Mask

The Mask property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	A string which represents the mask.
Settings

The settings for value are:

Setting	Description
	A zero length string  disables the mask and the MaskEdit control behaves like a standard Windows Edit control.
#	A flag for a digit: 0..9.
@	A flag for a letter or for a white space: A..Z, a..z,  .
*	A flag for any character.
Any Other Characters	Any other characters beside the three above become the visible part of  the Mask.
\#  \@  \*	To create a Mask with visible  #, @, *  characters, the \ will disable these flags and they become a visible part of the Mask, (see example on the Format Property Page).


Modified

This property allows for checking the MaskEdit control to see if the Text property has been modified.  It can also be reset to the unmodified state.

Syntax

Visual Basic

MaskEdit.Modified = value

value = MaskEdit.Modified

C++

MaskEdit.SetModified ( value );

value = MaskEdit.GetModified ( );

Delphi

MaskEdit.Modified := value

value := MaskEdit.Modified

The Modified property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	A Boolean value.
Settings

The settings for value are:

Setting	Description
False	The text has not been modified since the last time this Modified flag was set to False.
True	The text was modified since the last time this Modified flag was set to False.


PromptCharacter

This property determines how the available unfilled positions in the Mask will be represented while a user edits the text.

Syntax

Visual Basic

MaskEdit.PromptCharacter = value

value = MaskEdit.PromptCharacter

C++

MaskEdit.SetPromptCharacter ( value );

value = MaskEdit.GetPromptCharacter ( );

Delphi

MaskEdit.PromptCharacter := value

value := MaskEdit.PromptCharacter

The PromptCharacter property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	A string with a length of one which represents the prompt character.
Settings

The settings for value are:

Setting	Description
String with any  character	While editing, the text in unfilled character positions in the Mask are represented by the first character in the PromptCharacter string.


ReadOnly

The ReadOnly property controls whether or not the MaskEdit control will accept keyboard input.

Syntax

Visual Basic

object.ReadOnly = boolean

boolean = object.ReadOnly

Visual C++

object.SetReadOnly(boolean);

boolean = object.GetReadOnly();

Delphi

object.ReadOnly := boolean;

boolean:= object.ReadOnly;

The ReadOnly property syntax has these parts:

Part	Description
object	A MaskEdit object.
boolean	A Boolean expression that specifies whether object accepts keyboard input.
Settings

The settings for boolean are:

Setting	Description
True	The MaskEdit control will ignore keyboard input.
False	(Default) The MaskEdit control will accept keyboard input.


SelectionPersistance

This property allows the type of text selection to be defined when the control gets focus through a TAB key.

Syntax

Visual Basic

MaskEdit.SelectionPersistance = value

value = MaskEdit.SelectionPersistance

C++

MaskEdit.SetSelectionPersistance ( value );

value = MaskEdit.GetSelectionPersistance ( );

Delphi

MaskEdit.SelectionPersistance := value

value := MaskEdit.SelectionPersistance

The SelectionPersistance property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	An integer that represents an option.
Settings

The settings for value are:

Setting	Description
0	No selection on TAB.
1	The MaskEdit control will restore the selection which it had when it lost focus. (default)
2	The MaskEdit control will select whole text string on TAB.


Text

This property represents the edited part of the text string in the MaskEdit control.

Syntax

Visual Basic

MaskEdit.Text = value

value = MaskEdit.Text

C++

MaskEdit.SetText ( value );

value = MaskEdit.GetText ( );

Delphi

MaskEdit.Text := value

value := MaskEdit.Text

The Text property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	A string.
Settings

The settings for value are:

Setting	Description
A string up to 256 characters long	A text string that represents the editable portion of the text in the MaskEdit control.


TextDisabled

 This property determines the color of the text when the property Enabled is set to False.

Syntax

Visual Basic

MaskEdit.TextDisabled = value

value = MaskEdit.TextDisabled

C++

MaskEdit.SetTextDisabled ( value );

value = MaskEdit.GetTextDisabled ( );

Delphi

MaskEdit.TextDisabled := value;

value := MaskEdit.TextDisabled;

The TextDisabled property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	A long value specifying a color of disabled text.
Settings

The settings for value are:

Setting	Description
Color Value	A long value describing the text color when editing is disabled.


TextWithMask

This property represents the full text string including the Text and Mask if any. This is a bindable property of the Mask Edit control and it can be used for the connection to a database.

Syntax

Visual Basic

MaskEdit.TextWithMask = value

value = MaskEdit.TextWithMask

C++

MaskEdit.SetTextWithMask ( value );

value = MaskEdit.GetTextWithMask ( );

Delphi

MaskEdit.TextWithMask := value;

value := MaskEdit.TextWithMask;

The TextWithMask property syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
value	A string.
Settings

The settings for value are:

Setting	Description
A string up to 256 characters long	A text string that represents the Text and the Mask as it appears in the MaskEdit control.


MaskEdit Methods

List of Methods

The ProtoView MaskEdit control supports the following methods:

AboutBox	SetSelection	Undo


SetSelection

Sets the beginning and the end of the selected text string.

Syntax

Visual Basic

object.SetSelection start, end

Visual C++

object.SetSelection(start, end);

Delphi

object.SetSelection(start, end);

The SetSelection method syntax has these parts:

Part	Description
object	A MaskEdit object.
start	The beginning of the selection. (short integer)
end	The end of the selection. (short integer)
Remarks

If the start or the end is less than 0, then it automatically adjusted to the 0. If the start or the end is greater than the length of the TextWithMask, then it automatically adjusted to that value. The caret is set to the end of selection.


Undo

This method undoes the last change to the Text property.  It also checks for the value of the property  CanUndo and if it is False, then this method returns False, otherwise it returns True. After a call to this method, the CanUndo property is reset to False. Keyboard equivalent of this method is Ctrl - Z.

Syntax

Visual Basic

ReturnValue = MaskEdit.Undo

C++

ReturnValue = MaskEdit.Undo ( );

Delphi

ReturnValue := MaskEdit.Undo()

The Undo method syntax has these parts:

Part	Description
MaskEdit	A MaskEdit object.
ReturnValue	A Boolean value.
Return Values:

Return	Description
False	The Text property was not modified or changes can not be undone. The method did nothing.
True	The old Text was restored and the CanUndo property was reset to False..


MaskEdit Events

List of Events

The ProtoView MaskEdit control supports the following events:

Click GotFocusEvent KeyDown	KeyPress KeyUp LostFocusEvent	MouseDown MouseUp


ProtoView Multidirectional Button Control

The ProtoView Multidirectional Button is a button with four regions sensitive to mouse clicks.  Each region displays an arrow in a different direction.  This is a useful control when space on a dialog is tight or if a control is needed to present the user with options for scrolling a region.

 Multidirectional Button Properties

 Multidirectional Button Methods

 Multidirectional Button Events

The ProtoView Multidirectional Button has four buttons on one control.


Multidirectional Button Properties

List of Properties

The ProtoView Multidirectional Button control supports the following properties:

Appearance BorderStyle	Enabled	hWnd


Multidirectional Button Methods

List of Methods

The ProtoView Multidirectional Button control supports the following methods:

AboutBox


Multidirectional Button Events

List of Events

The ProtoView Multidirectional Button control supports the following events:

Click DblClick Down  KeyDown	KeyPress KeyUp Left  MouseDown	MouseMove MouseUp Right  Up


Down

Occurs when the user presses and then releases a mouse button over the Down Button of the Multidirectional Button.

Syntax

Visual Basic

Private Sub Object_Down( )

Visual C++

OnDownObject();

Delphi

Procedure Down(Sender);


Left

Occurs when the user presses and then releases a mouse button over the Left Button of the Multidirectional Button.

Syntax

Visual Basic

Private Sub Object_Left( )

Visual C++

OnLeftObject();

Delphi

Procedure Left(Sender);


Right

Occurs when the user presses and then releases a mouse button over the Right Button of the Multidirectional Button.

Syntax

Visual Basic

Private Sub Object_Right()

Visual C++

OnRightObject();

Delphi

Procedure Right(Sender);


Up

Occurs when the user presses and then releases a mouse button over the Up Button of the Multidirectional Button.

Syntax

Visual Basic

Private Sub Object_Up( )

Visual C++

OnUpObject();

Delphi

Procedure Up(Sender);


ProtoView Numeric Edit Control

The ProtoView Numeric Edit control is an ActiveX control which extends the capabilities of the standard Windows Edit control.  The Numeric Edit control is designed to edit text strings representing numeric values.  It allows developers to select a variety of numeric formats and set all aspects of a format independently.  It allows to

	Set limits for range validation of the numeric value or to use build-in limits for different data types
	Set minimum and maximum numbers of decimal places
	Output value as an integer, currency or a real for any format settings
	Represent a number with any data type in scientific (E power) format
	Select the default Windows settings for decimal and thousand separators
	Use spin buttons to increment-decrement numeric value and the delta can be any number as well a floating point data type

The control also has a wide selection of display options. In addition to the standard Edit control features, it  has

	2 edit modes,- insert and overwrite
	7 types of display styles,- regular, formatted, odometer, odometer light, odometer inverted, LED, LED bold
	Undo support
	Custom highlight and disabled text colors
	Automatic vertical alignment of the text at the center of the control              window

 Tips for Using the Numeric Edit Control

 Numeric Edit Properties

 Numeric Edit Methods

 Numeric Edit Events

Example of the ProtoView Numeric Edit control.


Tips to use Numeric Edit Control

1.	To set just the lower limit for the value range validation check, set the ValueMin to the desired limit and the ValueMax less than the ValueMin property.  You must also set the LimitValue to True.  It is not possible to set just an upper limit for range validation, both limits should be set.
2.	The Text property is supplied for the purpose of reading the Numeric Edit control string literally.  If you intend to use it for setting the numeric value, then you should be aware that the control will accept only digits.  When the first non-digit character is found (except for the negative sign and decimal point), the Numeric Edit control will stop accepting the string.  Therefore 12abc34 will be accepted only as 12. For scientific notation, all numeric values before the E will be accepted.  Any numeric values after the E will be accepted as the power of the value.  Therefore the value 12abcde34g will be accepted as 12 e 34.
3.	The Odometer and LED display formats override all default Windows painting colors except for the disabled text color.  If you want to use system colors, you should set them at design time from the combobox System Colors on the Colors Page, or at run time use system color values to set the color properties.
4.	For the Odometer display styles, set the HightlightInverted to True to get the most contrast for highlight colors.
5.	For  better appearance of the Numeric Edit control it is advisable to use the High Colors (16 bits, or 64K colors) display setting, when using  the Odometer or OdometerInverted display style.
6.	For the LED display styles the width of characters is calculated at runtime and depends on the height of the control window. For better alignment of the last visible character on the right side of the control window, it is advisable at design time to temporarily fill the control with a long text string and adjust the width of the Numeric Edit control window accordingly.


Numeric Edit Properties

List of Properties

The ProtoView Numeric Edit control supports the following properties:

Alignment AutoReformat Autoscroll CanUndo DecimalDefault DecimalMax DecimalMin DecimalSeparator DisplayFormat EditMode	EditModeChange Format FreeFormEntry HighlightColor HighlightInverted LimitValue LimitValueByType Modified ReadOnly SelectionPersistance	SpinButtons SuppressThousand Text TextDisabled ValueCurrency ValueInteger ValueMax ValueMin ValueReal (Default) ValueSpinDelta


Alignment

This property determines the horizontal alignment of the text when the control does not have the input focus.

Syntax

Visual Basic

NumericEdit.Alignment = value

value = NumericEdit.Alignment

C++

NumericEdit.SetAlignment ( value );

value = NumericEdit.GetAlignment ( );

Delphi

NumericEdit.Alignment := value

value := NumericEdit.Alignment

The Alignment property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	An integer or a predefined constant that represents the horizontal alignment of the text inside of the control window.
Settings

The settings for value are:

Setting	Description
0 - pvnLeft	The alignment of the text is left justified. (default)
1 - pvnCenter	The text is centered.
2 - pvnRight	The alignment is right justified.


AutoReformat

This property is applied only for scientific (power E) numeric formats. It allows the text to automatically be reformatted to the format #.##E## ("1.23E+4") on losing focus or on setting the Text property.

Syntax

Visual Basic

NumericEdit.AutoReformat = value

value = NumericEdit.Autoscroll

C++

NumericEdit.SetAutoReformat ( value );

value = NumericEdit.GetAutoReformat ( );

Delphi

NumericEdit.AutoReformat:= value

value := NumericEdit.AutoReformat

The AutoReformat property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A Boolean which represents the autoreformat option.
Settings

The settings for value are:

Setting	Description
False	No auto formatting.
True	(Default) The control will automatically format the value entered in to the control.


Autoscroll

This property allows the text to automatically scroll horizontally while editing the Numeric Edit control text when the text length is longer than the control width.

Syntax

Visual Basic

NumericEdit.Autoscroll = value

value = NumericEdit.Autoscroll

C++

NumericEdit.SetAutoscroll ( value );

value = NumericEdit.GetAutoscroll ( );

Delphi

NumericEdit.Autoscroll := value

value := NumericEdit.Autoscroll

The Autoscroll property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A Boolean which represents the horizontal autoscroll option.
Settings

The settings for value are:

Setting	Description
False	No autoscroll.
True	Horizontal autoscroll while editing the Numeric Edit control text. (default)


CanUndo

This property available at run time and can be used to determine if changes to the numeric value can be undone or not.

Syntax

Visual Basic

value = NumericEdit.CanUndo

C++

value = NumericEdit.GetCanUndo ( );

Delphi

value := NumericEdit.CanUndo

The CanUndo property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A Boolean value.
Settings

The settings for value are:

Setting	Description
False	The numeric value was not modified or changes can not be undone.
True	The numeric value was modified and the changes can be undone.


DecimalDefault

This property allows to set decimal / thousand separators to the default current Windows setting.

Syntax

Visual Basic

NumericEdit.DecimalDefault = value

value = NumericEdit.DecimalDefault

C++

NumericEdit.SetDecimalDefault ( value );

value = NumericEdit.GetDecimalDefault ( );

Delphi

NumericEdit.DecimalDefault := value

value := NumericEdit.DecimalDefault

The DecimalDefault property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A Boolean value that can be True or False.
Settings

The settings for value are:

Setting	Description
False	Decimal / thousand separators are the same as at design time.
True	Decimal / thousand separators are adjusted to the default Windows settings (default).


DecimalMax

This property determines the maximum number of decimal places in the numeric value.

Syntax

Visual Basic

NumericEdit.DecimalMax = value

value = NumericEdit.DecimalMax

C++

NumericEdit.SetDecimalMax ( value );

value = NumericEdit.GetDecimalMax ( );

Delphi

NumericEdit.DecimalMax := value

value := NumericEdit.DecimalMax

The DecimalMax property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	An integer that represents the maximum number of decimal places in the numeric value.
Settings

The settings for value are:

Setting	Description
0..13	Maximum number of decimal places. (default = 5)


DecimalMin

This property determines the minimum number of decimal places in the numeric value.

Syntax

Visual Basic

NumericEdit.DecimalMin = value

value = NumericEdit.DecimalMin

C++

NumericEdit.SetDecimalMin ( value );

value = NumericEdit.GetDecimalMin ( );

Delphi

NumericEdit.DecimalMin := value

value := NumericEdit.DecimalMin

The DecimalMin property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	An integer that represents the minimum number of decimal places in the numeric value.
Settings

The settings for value are:

Setting	Description
0..13	Minimum number of decimal places. (default = 0)


DecimalSeparator

This property determines a character that represents the decimal separator for the Numeric Edit format string.

Syntax

Visual Basic

NumericEdit.DecimalSeparator = value

value = NumericEdit.DecimalSeparator

C++

NumericEdit.SetDecimalSeparator  ( value );

value = NumericEdit.GetDecimalSeparator ( );

Delphi

NumericEdit.DecimalSeparator := value

value := NumericEdit.DecimalSeparator

The DecimalSeparator property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A string one character long .
Settings

The settings for value are:

Setting	Description
.	The decimal separator is the . and the thousand separator is the , character. (default)
,	The decimal separator is the , and the thousand separator is the . character.


DisplayFormat

This property determines the style of the text painting.

Syntax

Visual Basic

NumericEdit.DisplayFormat = value

value = NumericEdit.DisplayFormat

C++

NumericEdit.SetDisplayFormat ( value );

value = NumericEdit.GetDisplayFormat ( );

Delphi

NumericEdit.DisplayFormat := value

value := NumericEdit.DisplayFormat

The DisplayFormat property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	An integer or a predefined constant that represents the style of the Numeric Edit control text painting.
Settings

The settings for value are:

Setting	Description
0 - pvnNormal	The Numeric Edit control has the standard  Windows Edit control painting. (default)
1 - pvnFormatted	Formatted  text painting - every character of the text is in a square box.
2 - pvnOdometer	The odometer style text painting - every character is in a rectangle box with shadows: selected background color at the center and black at the bottom and the top.
3 - pvnOdomLight	The odometer style text painting - every character is in a rectangle box with shadows: white at the center and selected background color at the bottom and the top.
4 - pvnOdomInvert	The odometer style painting - every character is in a rectangle box with shadows: black color at the center and selected background at the bottom and the top.
5 - pvnLED	The LED style - characters resemble the Light Emitted Diode display with the selected Background and ForeColors.
6 - pvnLEDBold	The same as LED style but with increased thickness of character lines.


EditMode

This property determines the edit mode of the text.

Syntax

Visual Basic

NumericEdit.EditMode = value

value = NumericEdit.EditMode

C++

NumericEdit.SetEditMode ( value );

value = NumericEdit.GetEditMode ( );

Delphi

NumericEdit.EditMode := value

value := NumericEdit.EditMode

The EditMode property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A Boolean which represents the edit mode option.
Settings

The settings for value are:

Setting	Description
False	The overwrite edit mode. (default)
True	The insert edit mode.


EditModeChange

This property determines whether or not the user can change the edit mode of the Numeric Edit control at run time.

Syntax

Visual Basic

NumericEdit.EditModeChange = value

value = NumericEdit.EditModeChange

C++

NumericEdit.SetEditModeChange ( value );

value = NumericEdit.GetEditModeChange ( );

Delphi

NumericEdit.EditModeChange := value

value := NumericEdit.EditModeChange

The EditModeChange property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A Boolean which represents the permission to change the edit mode.
Settings

The settings for value are:

Setting	Description
False	Does not allow the user to change the edit mode.
True	Allows the user to toggle the edit mode using the Insert key. (default)


Format

This property determines the string representation of the numeric value. For all scientific formats the base of the power is equal 10.

Syntax

Visual Basic

NumericEdit.Format = value

value = NumericEdit.Format

C++

NumericEdit.SetFormat ( value );

value = NumericEdit.GetFormat ( );

Delphi

NumericEdit.Format := value

value := NumericEdit.Format

The Format property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	An integer or a predefined constant that represents the format of the Numeric Edit control string.
Settings

The settings for value are:

Setting	Description
0 - pvnNormal	The number is represented in the standard format with minus for negative values. (default)
1 - pvnBusiness	Positive numbers are represented in the standard format and negative- inside of parenthesis.
2 - pvnPower	The number is represented in the scientific format  with the e as a power character and with no plus in front of the e for a positive power.
3 - pvnPowerPlus	The number is represented in the scientific format  with the e as a power character and with plus in front of the e for a positive power.
4 - pvnPowerE	The number is represented in the scientific format  with the E as a power character and with no plus in front of the E for a positive power.
5 - pvnPowerEPlus	The number is represented in the scientific format  with the E as a power character and with plus in front of the E for a positive power.


FreeFormEntry

This property allows to enable free entries while editing the numeric control string, it disables any syntax and value validation checking.

Syntax

Visual Basic

NumericEdit.FreeFormEntry = value

value = NumericEdit.FreeFormEntry

C++

NumericEdit.SetFreeFormEntry ( value );

value = NumericEdit.GetFreeFormEntry ( );

Delphi

NumericEdit.FreeFormEntry:= value

value := NumericEdit.FreeFormEntry

The FreeFormEntry property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A Boolean which represents the free form option.
Settings

The settings for value are:

Setting	Description
False	(Default) No validation done while the user types a value.
True	The control will validate the users input as it is typed.


HighlightColor

This property determines the color used to paint the background of selected text in the control window.

Syntax

Visual Basic

NumericEdit.HighligthColor = value

value = NumericEdit.HighligthColor

C++

NumericEdit.SetHighligthColor ( value );

value = NumericEdit.GetHighligthColor ( );

Delphi

NumericEdit.HighlightColor := value

value := NumericEdit.HighlightColor

The HighligthColor property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A long value specifying a color value
Settings

The settings for value are:

Setting	Description
Color Value	A long value or an OLE color describing the color to paint the Numeric Edit background of the selected text.


HighlightInverted

This property determines how to paint the selected text and its background.  By turning this property on, highlighted text assumes the inverted colors of the normal text.

Syntax

Visual Basic

NumericEdit.HighlightInverted = value

value = NumericEdit.HighlightInverted

C++

NumericEdit.SetHighlightInverted ( value );

value = NumericEdit.GetHighlightInverted ( );

Delphi

NumericEdit.HighlightInverted := value

value := NumericEdit.HighlightInverted

The HighlightInverted property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A Boolean which represents an option.
Settings

The settings for value are:

Setting	Description
False	Background of the selected text is painted by the selected HighlightColor. (default)
True	Background and text of the selected text is painted by colors inverted to the original.


LimitValue

This property enables or disables range validation checking for a numeric value.

Syntax

Visual Basic

NumericEdit.LimitValue = value

value = NumericEdit.LimitValue

C++

NumericEdit.SetLimitValue ( value );

value = NumericEdit.GetLimitValue ( );

Delphi

NumericEdit.LimitValue := value

value := NumericEdit.LimitValue

The LimitValue property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A Boolean which enables or disables the validity check of a numeric value.
Settings

The settings for value are:

Setting	Description
False	No validity check of the numeric value except checking for limits of the double data type. (default)
True	The current numeric value is checked for minimum and maximum value limits after every entry and the control allows or forbids the numeric value modification based on the ValueMin and ValueMax properties.


LimitValueByType

This property can be used to set limits (properties ValueMin and ValueMax) for the range validation of the numeric value accordingly to a particular data type. When it is changed, the property LimitValue is set to True automaticly and can be modified later, but the properties DecimalMin and DecimalMax are adjusted automaticly only at design time.

Syntax

Visual Basic

NumericEdit.LimitValueByType = value

value = NumericEdit.LimitValueByType

C++

NumericEdit.SetLimitValueByType ( value );

value = NumericEdit.GetLimitValueByType ( );

Delphi

NumericEdit.LimitValueByType := value

value := NumericEdit.LimitValueByType

The LimitValueByType property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	An integer or a predefined constant that represents an option to set the minimum and maximum limits for the value range validation accordingly to a data type.
Settings

The settings for value are:

Setting	Description
0 - pvnFloat8	ValueMin = -1.7e307,        ValueMax = 1.7e307
1 - pvnFloat4	ValueMin = -3.4e38,          ValueMax = 3.4e38
2 - pvnCurrency	ValueMin = -9.1e14,          ValueMax = 9.1e14
3 - pvnInteger4	ValueMin = -2147483648, ValueMax = 2147483647
4 - pvnUnsigned4	ValueMin = 0,                   ValueMax = 4294967295
5 - pvnInteger2	ValueMin = -32768,          ValueMax = 32767
6 - pvnUnsigned2	ValueMin = 0,                   ValueMax = 65535
7 - pvnInteger1	ValueMin = -128,              ValueMax = 127
8 - pvnUnsigned1	ValueMin = 0,                   ValueMax = 255


Modified

This property allows checking of the Numeric Edit control to see if it has been modified.  It can also be reset to the unmodified state.

Syntax

Visual Basic

NumericEdit.Modified = value

value = NumericEdit.Modified

C++

NumericEdit.SetModified ( value );

value = NumericEdit.GetModified ( );

Delphi

NumericEdit.Modified := value

value := NumericEdit.Modified

The Modified property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A Boolean value.
Settings

The settings for value are:

Setting	Description
False	The numeric value was not modified since the last time this Modified flag was set to False.
True	The numeric value was modified since the last time this Modified flag was set to False.


ReadOnly

The ReadOnly property controls whether or not the NumericEdit control will accept keyboard input.

Syntax

Visual Basic

object.ReadOnly = boolean

boolean = object.ReadOnly

Visual C++

object.SetReadOnly(boolean);

boolean = object.GetReadOnly();

Delphi

object.ReadOnly := boolean;

boolean:= object.ReadOnly;

The ReadOnly property syntax has these parts:

Part	Description
object	A NumericEdit object.
boolean	A Boolean expression that specifies whether object accepts keyboard input.
Settings

The settings for boolean are:

Setting	Description
True	The NumericEdit control will ignore keyboard input.
False	(Default) The NumericEdit control will accept keyboard input.


SelectionPersistance

This property allows the type of text selection to be defined when the control gets focus through a TAB key.

Syntax

Visual Basic

NumericEdit.SelectionPersistance = value

value = NumericEdit.SelectionPersistance

C++

NumericEdit.SetSelectionPersistance ( value );

value = NumericEdit.GetSelectionPersistance ( );

Delphi

NumericEdit.SelectionPersistance := value

value := NumericEdit.SelectionPersistance

The SelectionPersistance property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	An integer that represents an option.
Settings

The settings for value are:

Setting	Description
0	No selection on TAB.
1	The Numeric Edit control will restore the selection which it had when it lost focus.
2	The Numeric Edit control will select whole text string on TAB. (default)


SpinButtons

This property determines the appearance of the increment/decrement spin buttons.

Syntax

Visual Basic

NumericEdit.SpinButtons  = value

value = NumericEdit.SpinButtons

C++

NumericEdit.SetSpinButtons  ( value );

value = NumericEdit.GetSpinButtons ( );

Delphi

NumericEdit.SpinButtons := value

value := NumericEdit.SpinButtons

The SpinButtons property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	An integer or a predifined constant that represents an option.
Settings

The settings for value are:

Setting	Description
0 - pvnNone	The spin buttons are hidden.
1 - pvnUpDown	The spin buttons are painted as the up / down arrows (triangles).
2 - pvnPlusMinus	The spin buttons are painted as the plus / minus  (default)


SuppressThousand

This property enables or disables the showing of thousand separators.

Syntax

Visual Basic

NumericEdit.SuppressThousand = value

value = NumericEdit.SuppressThousand

C++

NumericEdit.SetSuppressThousand  ( value );

value = NumericEdit.GetSuppressThousand ( );

Delphi

NumericEdit.SuppressThousand := value

value := NumericEdit.SuppressThousand

The SuppressThousand property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A Boolean value.
Settings

The settings for value are:

Setting	Description
False	The string representation of the numeric value contains thousand separators.
True	The string representation of the numeric value does not contain thousand separators.


Text

This property represents the Numeric Edit control text.

Syntax

Visual Basic

NumericEdit.Text = value

value = NumericEdit.Text

C++

NumericEdit.SetText ( value );

value = NumericEdit.GetText ( );

Delphi

NumericEdit.Text := value

value := NumericEdit.Text

The Text property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A string.
Settings

The settings for value are:

Setting	Description
A string up to 35 characters long	A string representation of a numeric value. For reading, it is the same as the current text in the control.  For writing, the control extracts only digits (up to 15) from it and the only numeric part of a number can be modified, the E part of the numeric value can not be modified by this property.


TextDisabled

This property determines the color of the text when the property Enabled is set to False.

Syntax

Visual Basic

Numeric Edit.TextDisabled = value

value = Numeric Edit.TextDisabled

C++

Numeric Edit.SetTextDisabled ( value );

value = MaksEdit.GetTextDisabled ( );

Delphi

Numeric Edit.TexpDisabled := value

value := Numeric Edit.TextDisabled

The TextDisabled property syntax has these parts:

Part	Description
Numeric Edit	A Numeric Edit object.
value	A long value specifying a color of the disabled text.
Settings

The settings for value are:

Setting	Description
Color Value	A long value describing the text color when editing is disabled.


ValueCurrency

This property can be used to set or get the numeric value in the currency data type representation.

Syntax

Visual Basic

NumericEdit.ValueCurrency = value

value = NumericEdit.ValueCurrency

C++

NumericEdit.SetValueCurrency ( value );

value = NumericEdit.GetValueCurrency ( );

Delphi

NumericEdit.ValueCurrency := value

value := NumericEdit.ValueCurrency

The ValueCurrency property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A currency data type value.
Settings

The settings for value are:

Setting	Description
A currency value.	The numeric value represented in the currency data type (8 bytes long) format.


ValueInteger

This property can be used to set or get the numeric value in the integer data type representation.

Syntax

Visual Basic

NumericEdit.ValueInteger = value

value = NumericEdit.ValueInteger

C++

NumericEdit.SetValueInteger ( value );

value = NumericEdit.GetValueInteger ( );

Delphi

NumericEdit.ValueInteger := value

value := NumericEdit.ValueInteger

The ValueInteger property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	An integer data type value.
Settings

The settings for value are:

Setting	Description
An integer value.	The numeric value represented in the integer data type (up to 4 bytes long) format.


ValueMax

This property determines the upper limit of the numeric value.  If the property LimitValue is set to False this property is disabled.

Syntax

Visual Basic

NumericEdit.ValueMax = value

value = NumericEdit.ValueMax

C++

NumericEdit.SetValueMax ( value );

value = NumericEdit.GetValueMax ( );

Delphi

NumericEdit.ValueMax := value

value := NumericEdit.ValueMax

The ValueMax property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A floating data type value for the upper limit of the numeric value.
Settings

The settings for value are:

Setting	Description
A double data type value	If this value is larger than the ValueMin and the LimitValue is set to True, then the numeric value is checked for both limits and the control allows or forbids the numeric value modification. If this value is less than the ValueMin and the LimitValue is set to True, then the numeric value is checked only for the lower limit defined by the property ValueMin.


ValueMin

This property determines the lower limit of the numeric value. If the property LimitValue is set to False this property is disabled.

Syntax

Visual Basic

NumericEdit.ValueMin = value

value = NumericEdit.ValueMin

C++

NumericEdit.SetValueMin ( value );

value = NumericEdit.GetValueMin ( );

Delphi

NumericEdit.ValueMin := value

value := NumericEdit.ValueMin

The ValueMin property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A floating data type value for the lower limit of the numeric value.
Settings

The settings for value are:

Setting	Description
A double data type value	If this value is less than the ValueMax and the LimitValue is set to True, then the numeric value is checked for both limits and the control allows or forbids the numeric value modification. If this value is larger than the ValueMax and the LimitValue is set to True, then the numeric value is checked only for the lower limit defined by this property.


ValueReal

This property can be used to set or get the numeric value in the floating point data type representation.

Syntax

Visual Basic

NumericEdit.ValueReal = value

value = NumericEdit.ValueReal

C++

NumericEdit.SetValueReal ( value );

value = NumericEdit.GetValueReal ( );

Delphi

NumericEdit.ValueReal := value

value := NumericEdit.ValueReal

The ValueReal property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A double data type value.
Settings

The settings for value are:

Setting	Description
A double data type value.	The numeric value represented in the floating point data type (up to 8 bytes long) format.


ValueSpinDelta

This property determines an increment / decrement value when the numeric value is modified using the spin buttons.

Syntax

Visual Basic

NumericEdit.ValueSpinDelta = value

value = NumericEdit.ValueSpinDelta

C++

NumericEdit.SetValueSpinDelta  ( value );

value = NumericEdit.GetValueSpinDelta ( );

Delphi

NumericEdit.ValueSpinDelta := value

value := NumericEdit.ValueSpinDelta

The ValueSpinDelta property syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
value	A floating point data type value.
Settings

The settings for value are:

Setting	Description
A positive value	The value by which the numeric value is incremented / decremented on pressing the spin buttons.(default = 1)


Numeric Edit Methods

List of Methods

The ProtoView Numeric Edit control supports the following methods:

AboutBox	Undo


Undo

This method undoes the last change to the numeric value.  It also checks for the value of the property  CanUndo and if it is False, then this method returns False, otherwise it returns True. After a call to this method, the CanUndo property is reset to False. Keyboard equivalent of this method is Ctrl - Z.

Syntax

Visual Basic

ReturnValue = NumericEdit.Undo

C++

ReturnValue = NumericEdit.Undo ( );

Delphi

ReturnValue := NumericEdit.Undo()

The Undo method syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
ReturnValue	A Boolean value.
Return Values:

Return	Description
False	The numeric value was not modified or changes can not be undone. The method did nothing.
True	The old numeric value was restored and the CanUndo property was reset to False..


Numeric Edit Events

List of Events

The ProtoView Numeric Edit control supports the following events:

Click Decrement GotFocusEvent Increment	KeyDown KeyPress KeyUp LostFocusEvent	MouseDown MouseUp


Decrement

This event is fired whenever the lower (- / ^) spin button of the control is pressed.

Syntax

Visual Basic

Private Sub NumericEdit _Decrement (ByVal DecrementValue As Double)

C++

void OnDecrementNumericEdit (double DecrementValue);

Delphi

procedure NumericEditDecrement(Sender: TObject; DecrementValue: Double);

The Decrement  event syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
DecrementValue	A double that is equal the negative value of the ValueSpinDelta property.
Return Value:	None (void).


Increment

This event is fired whenever the upper (+ / v) spin button of the control is pressed.

Syntax

Visual Basic

Private Sub NumericEdit _Increment (ByVal IncrementValue As Double)

C++

void OnIncrementNumericEdit (double IncrementValue);

Delphi

procedure NumericEditIncrement(Sender: TObject; IncrementValue: Double);

The Increment  event syntax has these parts:

Part	Description
NumericEdit	A Numeric Edit object.
IncrementValue	A double that is equal the ValueSpinDelta property.
Return Value:	None (void).


ProtoView Picture

The ProtoView Picture control is an ActiveX control for displaying graphical images, such as bitmaps, icons and metafiles.  These images can be displayed in their original size or stretched to display in the entire Picture control.  As added graphical features, customizable bevels can be displayed around the image and text can be displayed on top of the image.  In addition, the ProtoView Picture control can load pictures from disk at runtime, and even display a browse dialog for the user to choose the files from disk.

 Picture Properties

 Picture Methods

 Picture Events

Example of the ProtoView Picture Control.


Picture Properties

List of Properties

The ProtoView Picture control exposes the following list of properties:

BackColor BevelFaceColor  BevelHighlightColor  BevelShadowColor  Font ForeColor HorizontalJustification hWnd InnerBevel InnerBevelWidth	InterBevelWidth OuterBevel OuterBevelWidth Picture PictureHorizontalJustification PictureVerticalJustification Redraw StretchImage Text VerticalJustification


BevelFaceColor

This property sets or returns the color used to display the face of the Picture controls bevel. By default this is equivalent to the button face color

Syntax

Visual Basic

Picture.BevelFaceColor = value

value = Picture.BevelFaceColor

C++

Picture.SetBevelFaceColor ( value );

value = Picture.GetBevelFaceColor ( );

Delphi

Picture.BevelFaceColor := value;

value := Picture.BevelFaceColor;

The BevelFaceColor property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	A long value specifying a color for the face of the picture bevel.
Settings

The settings for value are:

Setting	Description
Color Value	A long value describing the color to paint the bevel face.  This is often created using the RGB command.


BevelHighlightColor

This property sets or returns the color used to display the highlighted edge of the Picture controls bevel.  By default this is equivalent to the button highlight color.

Syntax

Visual Basic

Picture.BevelHighlightColor = value

value = Picture.BevelHighlightColor

C++

Picture.SetBevelHighlightColor ( value );

value = Picture.GetBevelHighlightColor ( );

Delphi

Picture.BevelHighlightColor := value;

value := Picture.BevelHighlightColor;

The BevelHighlightColor property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	A long value specifying a color for the highlighted edge of the picture bevel.
Settings

The settings for value are:

Setting	Description
Color Value	A long value describing the color to paint the bevel highlighted edge.  This is often created using the RGB command.


BevelShadowColor

This property sets or returns the color used to display the shadow edge of the Picture controls bevel. By default this is equivalent to the button shadow color

Syntax

Visual Basic

Picture.BevelShadowColor = value

value = Picture.BevelShadowColor

C++

Picture.SetBevelShadowColor ( value );

value = Picture.GetBevelShadowColor ( );

Delphi

Picture.BevelShadowColor := value;

value := Picture.BevelShadowColor;

The BevelShadowColor property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	A long value specifying a color for the shadow edge of the picture bevel.
Settings

The settings for value are:

Setting	Description
Color Value	A long value describing the color to paint the bevel shadow edge.  This is often created using the RGB command.


HorizontalJustification

This property sets or returns the horizontal text justification of the Picture controls text.

Syntax

Visual Basic

Picture.HorizontalJustification = value

value = Picture.HorizontalJustification

C++

Picture.SetHorizontalJustification ( value );

value = Picture.GetHorizontalJustification ( );

Delphi

Picture.HorizontalJustification := value;

value := Picture.HorizontalJustification;

The HorizontalJustification property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	A constant which determines the text justification.
Settings

The settings for value are:

Setting	Description
Left - 0	The text will be left justified.
Center - 1	The text will be centered.
Right - 2	The text will be right justified.


InnerBevel

This property sets or returns the type of bevel painted on the inside portion of the Picture control frame.

Syntax

Visual Basic

Picture.InnerBevel = value

value = Picture.InnerBevel

C++

Picture.SetInnerBevel ( value );

value = Picture.GetInnerBevel ( );

Delphi

Picture.InnerBevel := value;

value := Picture.InnerBevel;

The InnerBevel property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	A constant which determines the type of bevel to paint.
Settings

The settings for value are:

Setting	Description
None - 0	No bevel will be painted.
Raised  - 1	A raised bevel will be painted giving the impression that the picture is outdented from the screen.
Inset - 2	A sunken bevel will be painted giving the impression that the picture is indented in the screen.


InnerBevelWidth

This property sets or returns the width of the bevel painted on the inside portion of the Picture control frame.  If the InnerBevel property is set to BEVEL_NONE the width of the bevel is painted a flat color.

Syntax

Visual Basic

Picture.InnerBevelWidth = value

value = Picture.InnerBevelWidth

C++

Picture.SetInnerBevelWidth ( value );

value = Picture.GetInnerBevelWidth ( );

Delphi

Picture.InnerBevelWidth := value;

value := Picture.InnerBevelWidth;

The InnerBevelWidth property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	An integer which sets the bevel width in pixels (screen coordinates).


InterBevelWidth

This property sets or returns the amount of space displayed between the inner and outer bevel painted on the Picture control frame.

Syntax

Visual Basic

Picture.InterBevelWidth = value

value = Picture.InterBevelWidth

C++

Picture.SetInterBevelWidth ( value );

value = Picture.GetInterBevelWidth ( );

Delphi

Picture.InterBevelWidth := value;

value := Picture.InterBevelWidth;

The InterBevelWidth property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	An integer which sets the width between bevels in pixels (screen coordinates).


OuterBevel

This property sets or returns the type of bevel painted on the outside portion of the Picture control frame.

Syntax

Visual Basic

Picture.OuterBevel = value

value = Picture.OuterBevel

C++

Picture.SetOuterBevel ( value );

value = Picture.GetOuterBevel ( );

Delphi

Picture.OuterBevel := value;

value := Picture.OuterBevel;

The OuterBevel property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	A constant which determines the type of bevel to paint.
Settings

The settings for value are:

Setting	Description
None - 0	No bevel will be painted.
Raised -1	A raised bevel will be painted giving the impression that the picture is outdented from the screen.
Inset - 2	A sunken bevel will be painted giving the impression that the picture is indented in the screen.


OuterBevelWidth

This property sets or returns the width of the bevel painted on the outside portion of the Picture control frame.  If the OuterBevel property is set to BEVEL_NONE the width of the bevel is painted a flat color.

Syntax

Visual Basic

Picture.OuterBevelWidth = value

value = Picture.OuterBevelWidth

C++

Picture.SetOuterBevelWidth ( value );

value = Picture.GetOuterBevelWidth ( );

Delphi

Picture.OuterBevelWidth := value;

value := Picture.OuterBevelWidth;

The OuterBevelWidth property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	An integer which sets the bevel width in pixels (screen coordinates).


Picture

This property sets or returns a dispatch to the picture object of the Picture control.

Syntax

Visual Basic

Picture.Picture = value

value = Picture.Picture

C++

Picture.SetPicture ( value );

value = Picture.GetPicture ( );

Delphi

Picture.Picture := value;

value := Picture.Picture;

The Picture property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	A picture object.


PictureHorizontalJustification

This property sets or returns the horizontal justification of the Picture controls image.  This property only has an effect if StretchImage is False.

Syntax

Visual Basic

Picture.PictureHorizontalJustification = value

value = Picture.PictureHorizontalJustification

C++

Picture.SetPictureHorizontalJustification ( value );

value = Picture.GetPictureHorizontalJustification ( );

Delphi

Picture.PictureHorizontalJustification := value;

value := Picture.PictureHorizontalJustification;

The PictureHorizontalJustification property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	A constant which determines the image justification.
Settings

The settings for value are:

Setting	Description
Left - 0	The image will be left justified.
Center - 1	The image will be centered.
Right - 2	The image will be right justified.


PictureVerticalJustification

This property sets or returns the vertical justification of the Picture controls image.  This property only has an effect if StretchImage is False.

    Syntax

Visual Basic

Picture.PictureVerticalJustification = value

value = Picture.PictureVerticalJustification

C++

Picture.SetPictureVerticalJustification ( value );

value = Picture.GetPictureVerticalJustification ( );

Delphi

Picture.PictureVerticalJustification := value;

value := Picture.PictureVerticalJustification;

The PictureVerticalJustification property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	A constant which determines the image justification.
Settings

The settings for value are:

Setting	Description
Top - 0	The image will be top justified.
Center - 1	The image will be centered.
Bottom - 2	The image will be bottom justified.


Redraw

This property determines if the picture control will repaint itself.  This property is useful if a container will set several properties on the Picture control simultaneously and does not want the Picture control to repaint after each change.  Setting this property to TRUE will cause the Picture control to refresh itself.

Syntax

Visual Basic

Picture.Redraw = value

value = Picture.Redraw

C++

Picture.SetRedraw ( value );

value = Picture.GetRedraw ( );

Delphi

Picture.Redraw := value;

value := Picture.Redraw;

The Redraw property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	A Boolean which determines if the Picture control will repaint itself.
Settings

The settings for value are:

Setting	Description
TRUE	The Picture control will repaint itself when necessary.
FALSE	The Picture control will not repaint itself even when the system requests the control to paint itself.


StretchImage

This property determines if the Picture control will stretch the image it is displaying.  Stretched images may encounter some distortion.

Syntax

Visual Basic

Picture.StretchImage = value

value = Picture.StretchImage

C++

Picture.StretchImage( value );

value = Picture.StretchImage( );

Delphi

Picture.StretchImage := value;

value := Picture.StretchImage;

The StretchImage property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	A Boolean which determines if the Picture controls image will be stretched.
Settings

The settings for value are:

Setting	Description
TRUE	The Picture control will stretch the image to occupy the entire area of the picture control, except for the beveled edge.
FALSE	The Picture control will draw the image at the exact size of the image.  If the image is larger than the entire area of the picture control, except for the beveled edge, the image will be clipped.


Text

This property sets or returns the text displayed by the picture control.  The positioning of the text can be customized.

Syntax

Visual Basic

Picture.Text = value

value = Picture.Text

C++

Picture.SetText ( value );

value = Picture.GetText ( );

Delphi

Picture.Text := value;

value := Picture.Text;

The Text property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	A string which is used to set or retrieve the value of the text displayed by the Picture control.


VerticalJustification

This property sets or returns the vertical text justification of the Picture controls text.  There are also two special justifications for the text to be placed in the Picture controls frame area.

Syntax

Visual Basic

Picture.VerticalJustification = value

value = Picture.VerticalJustification

C++

Picture.SetVerticalJustification ( value );

value = Picture.GetVerticalJustification ( );

Delphi

Picture.VerticalJustification := value;

value := Picture.VerticalJustification;

The VerticalJustification property syntax has these parts:

Part	Description
Picture	A Picture Control object.
value	A constant which determines the text justification.
Settings

The settings for value are:

Setting	Description
Top - 0	The text will be justified along the top of the picture.
Center - 1	The text will be justified in the middle of the picture.
Bottom - 2	The text will be justified at the bottom of the picture.
TopBorder - 3	The text will be justified in the frame of the top border.
BottomBorder - 4	The text will be justified in the frame of the bottom border.


Picture Methods

List of Methods

The ProtoView Picture control exposes the following list of methods:

AboutBox	BrowseForPicture	LoadPicture


BrowseForPicture

This method displays a common dialog to select a picture file from disk.  The Picture Control will then try to load and display that image from disk.  This method will fail if the image could not be loaded, access is denied to the file, or if the file is too large.

Syntax

Visual Basic

Picture.BrowseForPicture

C++

Picture.BrowseForPicture ( );

Delphi

Picture.BrowseForPicture;

The BrowseForPicture method syntax has these parts:

Part	Description
Picture	A Picture Control object.


LoadPicture

This method is passed a path to a picture file on disk.  The Picture Control will then try to load and display that image from disk.  This method will fail if the image could not be loaded, access is denied to the file, or if the file is too large.

Syntax

Visual Basic

Picture.LoadPicture ( FileName )

C++

Picture.LoadPicture ( FileName );

Delphi

Picture.LoadPicture ( FileName );

The LoadPicture method syntax has these parts:

Part	Description
Picture	A Picture Control object.
FileName	A string which contains a file name and optional full path to a file on disk.


Picture Events

List of Events

The ProtoView Picture control fires the following events:

Click DblClick	MouseDown MouseMove	MouseUp


ProtoView Progress Bar Control

The ProtoView Progress Bar can be used to display the amount of a task complete or any other statistical data requiring a percentage to be displayed.  The Progress Bar can be customized to display percentage values on the bottom of the bar, tick marks, and a percentage value in the control.

 Progress Bar Properties

 Progress Bar Methods

 Progress Bar Events

The first Progress Bar with numbers, tick marks and a percent value.  The second has only tick marks.  The third has only a percent value displayed.


Progress Bar Properties

List of Properties

The ProtoView Progress Bar control supports the following properties:

Appearance BackColor BorderStyle Enabled FillColor	Font ForeColor hWnd Limit  ShowNumbers	ShowPercentComplete  ShowTickMarks  Value


FillColor

FillColor returns or sets the color of an the filler bar on a ProgressBar control.

Syntax

Visual Basic

object.FillColor = color

color = object.FillColor

Visual C++

object.SetFillColor(OLE_COLOR color);

color = object.GetFillColor();

Delphi

object.FillColor := color;

color := object.FillColor;

The FillColor property syntax has these parts:

Part	Description
object	A ProgressBar object.
color	A color value or constant that determines the fill color of an object, as described in Settings.
Remarks

See the section Notes About Colors.


Limit

Returns or sets a value that represents 100% in a ProgressBar control.

Syntax

Visual Basic

object.Limit = limit

limit = object.Limit

Visual C++

object.SetLimit(limit);

limit  = object.GetLimit();

Delphi

object.Limit := limit;

limit := object.Limit;

The Limit property syntax has these parts:

Part	Description
object	A ProgressBar object.
limit	A long integer that specifies the number that is to represent 100% in a ProgressBar control.


ShowNumbers

Returns or sets a value that determines whether the ProgressBar control displays percent complete numbers below the progress bar.

Syntax

Visual Basic

object.ShowNumbers = boolean

boolean = object.ShowNumbers

Visual C++

object.SetShowNumbers(BOOL boolean);

boolean = object.GetShowNumbers();

Delphi

object.ShowNumbers := boolean;

boolean := object.ShowNumbers;

The ShowNumbers property syntax has these parts:

Part	Description
object	A ProgressBar object.
boolean	A Boolean expression that specifies whether object displays percent complete numbers.
Settings

The settings for boolean are:

Setting	Description
True	Causes object to display percent complete numbers.
False	(Default) Prevents object from displaying percent complete numbers.


ShowPercentComplete

Returns or sets a value that determines whether the ProgressBar control displays the percent complete number on its face.

Syntax

Visual Basic

object.ShowPercentComplete = boolean

boolean = object.ShowPercentComplete

Visual C++

object.SetShowPercentComplete(BOOL boolean);

boolean = object.GetShowPercentComplete();

Delphi

object.ShowPercentComplete := boolean;

boolean := object.ShowPercentComplete;

The ShowPercentComplete property syntax has these parts:

Part	Description
object	A ProgressBar object.
boolean	A Boolean expression that specifies whether object displays the percent complete number on its face.
Settings

The settings for boolean are:

Setting	Description
True	Causes object to display the percent complete number on its face.
False	(Default) Prevents object from displaying the percent complete number.


ShowTickMarks

Returns or sets a value that determines whether the ProgressBar control displays tick marks on its face.

Syntax

Visual Basic

object.ShowTickMarks = boolean

boolean = object.ShowTickMarks

Visual C++

object.SetShowTickMarks(BOOL boolean);

boolean = object.GetShowTickMarks();

Delphi

object.ShowTickMarks := boolean;

boolean := object.ShowTickMarks;

The ShowTickMarks property syntax has these parts:

Part	Description
object	A ProgressBar object.
boolean	A Boolean expression that specifies whether object displays tick marks.
Settings

The settings for boolean are:

Setting	Description
True	Causes object to display tick marks.
False	(Default) Prevents object from displaying tick marks.


Value

Returns or sets a value that represents the value in a ProgressBar control.

Syntax

Visual Basic

object.Value = value

value = object.Value

Visual C++

object.SetValue(long value);

value = object.GetValue();

Delphi

object.Value := value;

value := object.Value;

The Value property syntax has these parts:

Part	Description
object	A ProgressBar object.
value	A long integer that specifies the number that is to represent the value in a ProgressBar control.
Remarks

The percent complete is calculated as ( Value X 100 ) / Limit.


Progress Bar Methods

List of Methods

The ProtoView Progress Bar control supports the following methods:

AboutBox


Progress Bar Events

List of Events

The ProtoView Progress Bar control has no events.


Shape3D Control
ProtoView Shape3D Control

The ProtoView Shape3D control is useful for drawing a variety of geometric shapes within forms and dialogs.  Colors and 3D effects can be added to any shape as well. The Shape3D control behaves like a static text (label), that means it does not respond on any keyboard entries or mouse button click and is not able to get focus. The types of shape features supported by the Shape3D control are:

	It allows to draw ellipse, and shapes with 3, 4, 5 or 6 corners connected by lines.
	Any type of shape can be turned to be symmetrical: circle, square, diamond, pentagon, etc.
	Shapes with 5 or 6 corners can be transformed into stars. In the case of 5 corner stars, there are options to draw it with a whole area inside and to show or to hide central parts of lines that connect corners.
	The border width  can be varied from 0 to 100. All shapes but ellipse can be shifted horizontally and vertically to any extent (like transforming the rectangle into a parallelogram).
	Inside area of shapes can be set to be transparent.
	The control also allows to create a 3D effect by adding a shadow to a shape and shifting it horizontally or vertically from the main shape.
	All three colors: body of the shape, line and shadow can be set independently.
 Shape3D Properties

 Shape3D Methods

 Shape3D Events

Example of the Shape3D control.


Shape3D Properties

List of Properties

The ProtoView Shape3D control supports the following properties:

BackColor LineColor LineWidth RotateSide	ShadowColor ShadowHorizontal ShadowVertical Shape (Default)	ShiftShapeLeft ShiftShapeUp Symmetrical Transparent


LineColor

This property determines the color of the border line of a shape.

Syntax

Visual Basic

Shape.LineColor = value

value = Shape.LineColor

C++

Shape.SetLineColor ( value );

value = Shape.GetLineColor ( );

Delphi

Shape.LineColor := value

value := Shape.LineColor

The LineColor property syntax has these parts:

Part	Description
Shape	A Shape3D object.
value	A long value or an OLE Color specifying the color of the shapes border line.
Settings

The settings for value are:

Setting	Description
Color Value	A value describing the color of the shapes border line.  It can be created using the RGB function.


LineWidth

This property determines the width of the border lines.

Syntax

Visual Basic

Shape.LineWidth = value

value = Shape.LineWidth

C++

Shape.SetLineWidth ( value );

value = Shape.GetLineWidth ( );

Delphi

Shape.LineWidth := value

value := Shape.LineWidth

The LineWidth property syntax has these parts:

Part	Description
Shape	A Shape3D object.
value	An integer value specifying the width of a line.
Settings

The settings for value are:

Setting	Description
Integer 1..100	The width of the border line in pixels.


RotateSide

This property allows the orientation of a shape to be changed. This property does not apply to the ellipse.

Syntax

Visual Basic

Shape.RotateSide = value

value = Shape.RotateSide

C++

Shape.SetRotateSide ( value );

value = Shape.GetRotateSide ( );

Delphi

Shape.RotateSide := value

value := Shape.RotateSide

The RotateSide property syntax has these parts:

Part	Description
Shape	A Shape3D object.
value	A Boolean which represents an option.
Settings

The settings for value are:

Setting	Description
False	The lower side of the shape is horizontal and the shape has a standard appearance.
True	Shapes with 3 and 5 corners are turned upside down (rotated by 180 degree). Shapes with 4 and 6 corners are rotated by 90 degree: for example, a rectangle becomes a diamond.


ShadowColor

This property determines the color of the shape shadow.

Syntax

Visual Basic

Shape.ShadowColor = value

value = Shape.ShadowColor

C++

Shape.SetShadowColor ( value );

value = Shape.GetShadowColor ( );

Delphi

Shape.ShadowColor := value

value := Shape.ShadowColor

The ShadowColor property syntax has these parts:

Part	Description
Shape	A Shape3D object.
value	A long value or an OLE Color specifying the color of the shapes shadow.
Settings

The settings for value are:

Setting	Description
Color Value	A value describing the color of the shapes shadow.  It can created using the RGB function.


ShadowHorizontal

This property determines the horizontal shift of the shadow from the shape.

Syntax

Visual Basic

Shape.ShadowHorizontal = value

value = Shape.ShadowHorizontal

C++

Shape.SetShadowHorizontal ( value );

value = Shape.GetShadowHorizontal ( );

Delphi

Shape.ShadowHorizontal := value

value := Shape.ShadowHorizontal

The ShadowHorizontal property syntax has these parts:

Part	Description
Shape	A Shape3D object.
value	An integer value specifying the horizontal shift of the shadow from the shape.
Settings

The settings for value are:

Setting	Description
-100..+100	Horizontal shift of the shadow from the shape in pixels.


ShadowVertical

This property determines the vertical shift of the shadow from the shape.

Syntax

Visual Basic

Shape.ShadowVertical = value

value = Shape.ShadowVertical

C++

Shape.SetShadowVertical ( value );

value = Shape.GetShadowVertical ( );

Delphi

Shape.ShadowVertical := value

value := Shape.ShadowVertical

The ShadowVertical property syntax has these parts:

Part	Description
Shape	A Shape3D object.
value	An integer value specifying the vertical shadow shift.
Settings

The settings for value are:

Setting	Description
-100..+100	Vertical shift of shadow from the shape in pixels.


Shape

This property determines the type of the shape to be drawn.

Syntax

Visual Basic

Shape.Shape = value

value = Shape.Shape

C++

Shape.SetShape ( value );

value = Shape.GetShape ( );

Delphi

Shape.Shape := value

value := Shape.Shape

The ShapeStyle property syntax has these parts:

Part	Description
Shape	A Shape3D object.
value	An integer or a predifined constant that specifies a shape.
Settings

The settings for value are:

Setting	Description
0 - pvsEllipse	Ellipse.
1 - pvsTriangle	Triangle.
2 - pvsRectangle	Rectangle.
3 - pvsPentagon	Pentagon.
4 - pvsHexagon	Hexagon.
5 - pvsStar5	5 rays star with all lines connecting the corners.
6 - pvsStar5Hole	5 rays star with all lines connecting the corners and transparent central pentagon area.
7 - pvsStar5Fixed	5 rays star with the only border lines.
8 - pvsStar6	6 rays star with the only border lines.


ShiftShapeLeft

This property shifts a shape horizontally from the central position: upper part of the shape is shifted left and the lower part of the shape is shifted right. If the shape has 5 or 6 corners then middle corners are also shifted. If the value of this property is negative, then the shape is shifted in the opposite direction. In case of an ellipse this property is disabled.

Syntax

Visual Basic

Shape.ShiftShapeLeft = value

value = Shape.ShiftShapeLeft

C++

Shape.SetShiftShapeLeft ( value );

value = Shape.GetShiftShapeLeft ( );

Delphi

Shape.ShiftShapeLeft := value

value := Shape.ShiftShapeLeft

The ShiftShapeLeft property syntax has these parts:

Part	Description
Shape	A Shape3D object.
value	An integer value specifying the horizontal shift of a shape.
Settings

The settings for value are:

Setting	Description
-800..+800	Horizontal shift of a shape from the central position in pixels.


ShiftShapeUp

This property shifts a shape vertically from the central position: left part of the shape is shifted up and the lower part of the shape is shifted down. If the shape has 5 or 6 corners then middle corners are also shifted. If the value of this property is negative, then the shape is shifted in the opposite direction. In case of an ellipse this property is disabled.

Syntax

Visual Basic

Shape.ShiftShapeUp = value

value = Shape.ShiftShapeUp

C++

Shape.SetShiftShapeUp ( value );

value = Shape.GetShiftShapeUp ( );

Delphi

Shape.ShiftShapeUp := value

value := Shape.ShiftShapeUp

The ShiftShapeUp property syntax has these parts:

Part	Description
Shape	A Shape3D object.
value	An integer value specifying the vertical shift of a shape.
Settings

The settings for value are:

Setting	Description
-800..+800	Vertical shift of a shape from the central position in pixels.


Symmetrical

This property forces a symmetrical appearance of a shape.

Syntax

Visual Basic

Shape.Symmetrical = value

value = Shape.Symmetrical

C++

Shape.SetSymmetrical ( value );

value = Shape.GetSymmetrical ( );

Delphi

Shape.Symmetrical := value

value := Shape.Symmetrical

The Symmetrical property syntax has these parts:

Part	Description
Shape	A Shape3D object.
value	A Boolean which represents an option.
Settings

The settings for value are:

Setting	Description
False	All corners of the shape are on the border of the control window. In the case of an ellipse, it touches all sides of the control window rectangle.
True	The shape is completely symmetrical and is drawn to be closest to the upper left corner of the control window rectangle.


Transparent

This property disables the background painting and the shapes body becomes transparent.

Syntax

Visual Basic

Shape.Transparent = value

value = Shape.Transparent

C++

Shape.SetTransparent ( value );

value = Shape.GetTransparent ( );

Delphi

Shape.Transparent := value

value := Shape.Transparent

The Transparent property syntax has these parts:

Part	Description
Shape	A Shape3D object.
value	A Boolean which represents an option.
Settings

The settings for value are:

Setting	Description
False	The background of a shape is painted using the BackColor property.
True	A shape is transparent and only the border lines are drawn. Note: any kinds of stars will be drawn by uninterrupted lines connecting corners of a shape.


Shape3D Methods

List of Methods

The ProtoView Shape3D control supports the following methods:

AboutBox


Shape3D Events

List of Events

The Shape3D control does not fire any events


ProtoView Text3D

The ProtoView Text3D control can be set to appear as a static text or as a frame control. If it is set as a static text, then the text appears inside of the control window.   If it set to a frame, the text appears on the top border of the control window. The text in the control is read-only and the control does not get the focus or respond to any keyboard entries.

The Text3D control has these features:

	The control has 70 built-in border styles, including different 3D effects and picture frames.
	In addition to the border style, a shadow for the control window can be added.
	The background of the control can be filled with any selected color or set to be transparent.  If transparent, the background is not painted and whatever is underneath the control window becomes visible.
	The text can be painted in three different ways: flat, 3D with one side highlighted and 3D with highlighted and shadowed sides.
	All control colors (background, frame, text, highlight and shadow) can be adjusted independently.
	The control also allows you to set the shift of the 3D highlight-shadow parts of the text in any direction (horizontal from -20 to +20 pixels and vertical from -20 to +20) which gives the ability to create any 3D effect with any depth.
	The Text property is bindable and can be used to display a text string from a data base field.

 Tips to Use the Text3D Control

 Text3D Properties

 Text3D Methods

 Text3D Events

Example of the ProtoView Text3D control.


Tips to use Text3D Control

If you use the ProtoView Text3D control as a frame to contain other controls that expect mouse events, the Text3D control may intercept these mouse events before the contained controls.


Text3D Properties

List of Properties

The ProtoView Text3D control supports the following properties:

Alignment BackColor Font ForeColor FrameColor	FrameShadow FrameStyle HighlightColor OffsetHorizontal OffsetVertical	ShadowColor Text (Default) TextOnFrame TextStyle Transparent


Alignment

This property determines the text alignment inside of the control window.

Syntax

Visual Basic

Text3D.Alignment = value

value = Text3D.Alignment

C++

Text3D.SetAlignment ( value );

value = Text3D.GetAlignment  ( );

Delphi

Text3D.Alignment := value

value := Text3D.Alignment

The Alignment property syntax has these parts:

Part	Description
Text3D	A Text3D object.
value	An integer value or a predifined constant specifying a desired text alignment.
Settings

The settings for value are:

Setting	Description
0 - pvtLeft	Text is left justified. (default)
1 - pvtCenter	Text at the center.
2 - pvtRight	Text is right justified.


FrameColor

This property determines the border colors of the control window.

Syntax

Visual Basic

Text3D.FrameColor = value

value = Text3D.FrameColor

C++

Text3D.SetFrameColor ( value );

value = Text3D.GetFrameColor ( );

Delphi

Text3D.FrameColor := value

value := Text3D.FrameColor

The FrameColor property syntax has these parts:

Part	Description
Text3D	A Text3D object.
value	An integer value or a predifined constant specifying a desired color of the border painting.
Settings

The settings for value are:

Setting	Description
0 - pvtDefault	The border is drawn with the current window color.
1 - pvtGray 2 - pvtBlue 3 - pvtGreen 4 - pvtRed 5 - pvtDeepPurple	The border shadows are white/gray/black (default) The border shadows are light-blue/blue/dark-blue The border shadows are white/green/dark-green The border shadows are yellow/red/brown The border shadows are light-purple/deep-purple


FrameShadow

This property determines whether or not to paint a shadow for the control window.

Syntax

Visual Basic

Text3D.FrameShadow = value

value = Text3D.FrameShadow

C++

Text3D.SetFrameShadow ( value );

value = Text3D.GetFrameShadow ( );

Delphi

Text3D.FrameShadow := value

value := Text3D.FrameShadow

The FrameShadow property syntax has these parts:

Part	Description
Text3D	A Text3D object.
value	A Boolean value turning shadow on or off.
Settings

The settings for value are:

Setting	Description
False	The shadow is not painted.
True	The shadow is painted.


FrameStyle

This property determines the border style of the control window.

Syntax

Visual Basic

Text3D.FrameStyle = value

value = Text3D.FrameStyle

C++

Text3D.SetFrameStyle ( value );

value = Text3D.GetFrameStyle ( );

Delphi

Text3D.FrameStyle := value

value := Text3D.FrameStyle

The FrameStyle property syntax has these parts:

Part	Description
Text3D	A Text3D object.
value	An integer value or a predifined constant specifying a desired style of the border painting.
Settings

The settings for value are:

Setting	Description
0 - pvtNone 1 - pvtPlain 11 - pvtIndent 21 - pvtOutdent 31 - pvtSunken 41 - pvtRaised 51 - pvtFrame 61 - pvtSharp	The FrameStyle can be set using an explicit integer value (0..70) for a particular style or can be build using a corresponding constant and an additional integer (0..9). For example:  Text3D1.FrameStyle = 38 Text3D1.FrameStyle = pvtIndent + 4 Complexity and width of the border frame increases with increasing an additional integer.


HighlightColor

This property determines the highlight color of the text 3D styles.

Syntax

Visual Basic

Text3D.HighlightColor = value

value = Text3D.HighlightColor

C++

Text3D.SetHighlightColor ( value );

value = Text3D.GetHighlightColor ( );

Delphi

Text3D.HighlightColor := value;

value := Text3D.HighlightColor;

The HighlightColor property syntax has these parts:

Part	Description
Text3D	A Text3D object.
value	A long value specifying a highlight color.
Settings

The settings for value are:

Setting	Description
Color Value	A long value describing the highlight color of 3D text styles.  This value can be created using the RGB function.


OffsetHorizontal

This property determines the horizontal offset of the highlighted and shadowed parts of the text for 3D text styles.

Syntax

Visual Basic

Text3D.OffsetHorizontal = value

value = Text3D.OffsetHorizontal

C++

Text3D.SetOffsetHorizontal  ( value );

value = Text3D.GetOffsetHorizontal  ( );

Delphi

Text3D.OffsetHorizontal := value

value := Text3D.OffsetHorizontal

The OffsetHorizontal property syntax has these parts:

Part	Description
Text3D	A Text3D object.
value	An integer value specifying a desired horizontal offset of the 3D text effects.
Settings

The settings for value are:

Setting	Description
-20..+20	Horizontal offset of the highlighted and shadowed parts of the text in pixels.


OffsetVertical

This property determines the vertical offset of the highlighted and shadowed parts of the text in case of the 3D text styles.

Syntax

Visual Basic

Text3D.OffsetVertical = value

value = Text3D.OffsetVertical

C++

Text3D.SetOffsetVertical  ( value );

value = Text3D.GetOffsetVertical  ( );

Delphi

Text3D.OffsetVertical := value

value := Text3D.OffsetVertical

The OffsetVertical property syntax has these parts:

Part	Description
Text3D	A Text3D object.
value	An integer value specifying a desired vertical offset of the 3D text effects.
Settings

The settings for value are:

Setting	Description
-20..+20	Vertical offset of the highlighted and shadowed parts of the text in pixels.


ShadowColor

This property determines the color of the shadow part of the text 3D with Shadow style and also the color of the outer shadow of the control window if the FrameShadow property is set to True.

Syntax

Visual Basic

Text3D.ShadowColor = value

value = Text3D.ShadowColor

C++

Text3D.SetShadowColor ( value );

value = Text3D.GetShadowColor ( );

Delphi

Text3D.ShadowColor := value;

value := Text3D.ShadowColor;

The ShadowColor property syntax has these parts:

Part	Description
Text3D	A Text3D object.
value	A long value specifying a shadow color.
Settings

The settings for value are:

Setting	Description
Color Value	A long value describing the shadow color of the 3D with Shadow text style and the shadow color of the control window.  This value can be created using the RGB function.


Text

This property represents the text string in the Text3D control. This is a bindable property of the Text3D control and it can be used for the connection to a database.

Syntax

Visual Basic

Text3D.Text = value

value = Text3D.Text

C++

Text3D.SetText ( value );

value = Text3D.GetText ( );

Delphi

Text3D.Text := value

value := Text3D.Text

The Text property syntax has these parts:

Part	Description
Text3D	A Text3D object.
value	A string.
Settings

The settings for value are:

Setting	Description
A string	A string that represents the text in the Text3D control.


TextOnFrame

This property converts the default Static Text control into a Frame control. It means that the text is moved from inside of the control window on to the top border of the control.

Syntax

Visual Basic

Text3D.TextOnFrame = value

value = Text3D.TextOnFrame

C++

Text3D.SetTextOnFrame  ( value );

value = Text3D.GetTextOnFrame ( );

Delphi

Text3D.TextOnFrame := value

value := Text3D.TextOnFrame

The TextOnFrame property syntax has these parts:

Part	Description
Text3D	A Text3D object.
value	A Boolean value specifying a desired type of the control.
Settings

The settings for value are:

Setting	Description
False	The control is a static text. (default)
True	The control is a frame.


TextStyle

This property determines the style used to paint the text in the control window.

Syntax

Visual Basic

Text3D.TextStyle = value

value = Text3D.TextStyle

C++

Text3D.SetTextStyle  ( value );

value = Text3D.GetTextStyle  ( );

Delphi

Text3D.TextStyle := value

value := Text3D.TextStyle

The TextStyle property syntax has these parts:

Part	Description
Text3D	A Text3D object.
value	An integer value or a predifined constant specifying a desired style of the text painting.
Settings

The settings for value are:

Setting	Description
0 - pvtFlat	Text without 3D effects.
1 - pvtOne3D	Text with a regular highlighted part. (default)
2 - pvtTwo3D	Text with both highlighted and shadowed parts.


Text3D Methods

List of Methods

The ProtoView Text3D control supports the following methods:

AboutBox


Text3D Events

List of Events

The ProtoView Text3D control supports the following events:

Though the Text3D control fires mouse button events, it does not recieve input focus - the focus remains where it was before.

MouseDown	MouseUp


ProtoView Time Edit Control

The ProtoView Time Edit control is control can be a read-only or editable control for displaying and editing times.  The control can be customized to display 12 or 24 hour time, and seconds are optional.

For advanced features, the control can start and stop as a clock, to always display the current time, and it can display itself in LED or odometer display.

 Time Edit Properties

 Time Edit Methods

 Time Edit Events

The Time Edit control with text, LED and odometer display.  Notice the LED control is displaying seconds.


Time Edit Properties

List of Properties

The ProtoView Time Edit control supports the following properties:

AMString  Appearance BackColor BorderStyle DisplayStyle  Enabled Font	ForeColor Hour  hWnd LeadZero  Minute  NoHideSel  PMString	ReadOnly  Second  SeparatorCharacter  ShowSeconds  Time  TwentyFourHourClock  UseDefaultFormat


AMString

The AMString property is the text string used to indicate morning (am) in a 12 hour clock format.

Syntax

Visual Basic

object.AMString= amString

amString  = object.AMString

Visual C++

object.SetAMString(amString);

amString  = object.GetAMString();

Delphi

object.AMString:= amString;

amString  := object.AMString;

The AMString property syntax has these parts:

Part	Description
object	A TimeEdit object.
amString	A string used to represent morning (am) in a 12 hour clock format. By default, this property is set to am.


DisplayStyle

The DisplayStyle property controls the display format of the time presented in the TimeEdit control.

Syntax

Visual Basic

object.DisplayStyle = format

format = object.DisplayStyle

Visual C++

object.SetDisplayStyle(format);

format = object.GetDisplayStyle();

Delphi

object.DisplayStyle := format;

format := object.DisplayStyle;

The DisplayStyle property syntax has these parts:

Part	Description
object	A TimeEdit object.
format	A constant which determines the format to display the time with.
The settings for format are:

Setting	Description
fmtNORMAL	Displays the date in the normal style.
FmtLED	Displays the date using an LED style.
FmtODOMETER	Displays the date using an odometer style.


Hour

The Hour property represents the hour of the time displayed in a TimeEdit Control.

Syntax

Visual Basic

object.Hour = hour

hour = object.Hour

Visual C++

object.SetHour(hour);

hour = object.GetHour();

Delphi

object.Hour := hour;

hour := object.Hour;

The Hour property syntax has these parts:

Part	Description
object	A TimeEdit object.
hour	A short integer that represents the hour in a TimeEdit control.


LeadZero

The LeadZero property controls whether or not a zero is added to hours less than 10.

Syntax

Visual Basic

object.LeadZero= boolean

boolean = object.LeadZero

Visual C++

object.SetLeadZero(boolean);

boolean = object.GetLeadZero();

Delphi

object.LeadZero := boolean;

boolean := object.LeadZero;

The LeadZero property syntax has these parts:

Part	Description
object	A TimeEdit object.
boolean	A Boolean expression that specifies whether object should display a added zero to hours less than 10.
The settings for boolean are:

Setting	Description
True	The TimeEdit control will precede hours less than 10 with a zero.
False	The TimeEdit control will not precede hours less than 10 with a zero.


Minute

The Minute property represents the Minute of the time displayed in a TimeEdit Control.

Syntax

Visual Basic

object.Minute= Minute

Minute = object.Minute

Visual C++

object.SetMinute(Minute);

Minute = object.GetMinute();

Delphi

object.Minute := Minute;

Minute := object.Minute;

The Minute property syntax has these parts:

Part	Description
object	A TimeEdit object.
Minute	A short integer that represents the Minute in a TimeEdit control.


NoHideSel

Returns or sets the selection display state of a TimeEdit control.

Syntax

Visual Basic

object.NoHideSel = boolean

boolean = object.NoHideSel

Visual C++

object.SetNoHideSel(boolean);

boolean = object.GetNoHideSel();

Delphi

object.NoHideSel := boolean;

boolean := object.NoHideSel;

The NoHideSel property syntax has these parts:

Part	Description
object	A TimeEdit object.
boolean	A Boolean expression that specifies whether the selection state remains constant when the TimeEdit control looses focus.
Settings

The settings for boolean are:

Setting	Description
True	The selected text in the TimeEdit control is always painted with the highlight background color.
False	(Default) The selected text in the TimeEdit control is painted with the highlight background color only when the control has focus.
Remarks

This property should normally be set to False (the default value) to comply with Microsofts interface design guidelines for Windows programs.


PMString

The PMString property is the text string used to indicate evening (PM) in a 12 hour clock format.

Syntax

Visual Basic

object.PMString = pmString

pmString = object.PMString

Visual C++

object.SetPMString(pmString);

pmString = object.GetPMString();

Delphi

object.PMString := pmString;

pmString := object.PMString;

The PMString property syntax has these parts:

Part	Description
object	A TimeEdit object.
pmString	A string used to represent evening (PM) in a 12 hour clock format. By default, this property is set to PM.


ReadOnly

The ReadOnly property controls whether or not the TimeEdit control will accept keyboard input.

Syntax

Visual Basic

object.ReadOnly = boolean

boolean = object.ReadOnly

Visual C++

object.SetReadOnly(boolean);

boolean = object.GetReadOnly();

Delphi

object.ReadOnly := boolean;

boolean:= object.ReadOnly;

The ReadOnly property syntax has these parts:

Part	Description
object	A TimeEdit object.
boolean	A Boolean expression that specifies whether object accepts keyboard input.
Settings

The settings for boolean are:

Setting	Description
True	The TimeEdit will ignore keyboard input.
False	(Default) The TimeEdit will accept keyboard input.


Second

The Second property represents the Second of the time displayed in a TimeEdit Control.

Syntax

Visual Basic

object.Second = Second

Second = object.Second

Visual C++

object.SetSecond(Second);

Second = object.GetSecond();

Delphi

object.Second := Second;

Second := object.Second;

The Second property syntax has these parts:

Part	Description
object	A TimeEdit object.
Second	A short integer that represents the Second in a TimeEdit control.


SeparatorCharacter

The SeparatorCharacter property is the character used to separate the different parts of the time string.

Syntax

Visual Basic

object.SeparatorCharacter = SeperatorCharacter

SeperatorCharacter = object.SeparatorCharacter

Visual C++

object.SetSeparatorCharacter(SeperatorCharacter);

SeperatorCharacter = object.GetSeparatorCharacter();

Delphi

object.SeparatorCharacter = SeperatorCharacter;

SeperatorCharacter := object.SeparatorCharacter;

The SeparatorCharacter property syntax has these parts:

Part	Description
object	A TimeEdit object.
SeparatorCharacter	A string that holds the seperator character. If the string contains more than one character, the first character of the string is used as the seperator character.
Remarks

The SeparatorCharacter property is used to separate the different parts of the time. The separator character is placed between the hour, minute and seconds portions of the time when the time is displayed in the hh:mm:ss format.


ShowSeconds

The ShowSeconds property controls the display format of the time presented in the TimeEdit control. If set to True, the time is displayed in the hh:mm:ss format; otherwise, the time is shown in the hh:mm format.

Syntax

Visual Basic

object.ShowSeconds = boolean

boolean = object.ShowSeconds

Visual C++

object.SetShowSeconds(boolean);

boolean = object.GetShowSeconds();

Delphi

object.ShowSeconds := boolean;

boolean := object.ShowSeconds;

The ShowSeconds property syntax has these parts:

Part	Description
object	A TimeEdit object.
boolean	A Boolean expression that specifies whether object should display seconds.
Settings

The settings for boolean are:

Setting	Description
True	(Default) The TimeEdit will display seconds.
False	The TimeEdit will not display seconds.


Time

The Time property is the string representation of the time in a TimeEdit control.

Syntax

Visual Basic

object.Time = time

time = object.Time

Visual C++

object.SetTime(time);

time = object.GetTime();

Delphi

object.Time := time;

time := object.Time;

The Time property syntax has these parts:

Part	Description
object	A TimeEdit object.
time	The string representation of the time in a TimeEdit control.


TwentyFourHourClock

The TwentyFourHourClock property controls whether the time will be displayed as a 12-Hour or 24-Hour clock.

Syntax

Visual Basic

object.TwentyFourHourClock = boolean

boolean = object.TwentyFourHourClock

Visual C++

object.SetTwentyFourHourClock(boolean);

boolean = object.GetTwentyFourHourClock();

Delphi

object.TwentyFourHourClock := boolean;

boolean := object.TwentyFourHourClock;

The TwentyFourHourClock property syntax has these parts:

Part	Description
object	A TimeEdit object.
boolean	A Boolean expression that specifies whether object should display a 12 or 24 hour clock.
Settings

The settings for boolean are:

Setting	Description
True	(Default) The TimeEdit will display the time as a 24 hour clock.
False	The TimeEdit will not display the time as a 24 hour clock.


UseDefaultFormat

The UseDefaultFormat property controls the display format of the time presented in the TimeEdit control.

Syntax

Visual Basic

object.UseDefaultFormat = boolean

boolean = object.UseDefaultFormat

Visual C++

object.SetUseDefaultFormat(boolean);

boolean = object.GetUseDefaultFormat();

Delphi

object.UseDefaultFormat := boolean;

boolean := object.UseDefaultFormat;

The UseDefaultFormat property syntax has these parts:

Part	Description
object	A TimeEdit object.
boolean	A Boolean expression that specifies whether object should display the date using the windows format (as specified in the control panel settings) or display the date according to the controls property settings.
Settings

The settings for boolean are:

Setting	Description
True	(Default) The TimeEdit will use its own format to display the time.
False	The TimeEdit will display the time according to the format specified by the container.
Remarks

If the UseDefaultFormat property is set to True, the settings for ShowSeconds and SeparatorCharacter are ignored and the corresponding settings found in the Windows Control Panel are used instead.


Time Edit Methods

List of Methods

The ProtoView Time Edit control supports the following methods:

AboutBox	StartClock	StopClock


StartClock

Causes the TimeEdit control to begin counting time from the current system time.

Syntax

Visual Basic

object.StartClock

Visual C++

void object::StartClock();

Delphi

object.StartClock;

The StartClock method syntax has these parts:

Part	Description
object	A TimeEdit object.
Remarks

The method causes the control to start keeping time, i.e., the control continuously increments the time displayed in the control by 1 second every second, as if it were a clock or a stopwatch.


StopClock

Causes the TimeEdit control to stop counting time.

Syntax

Visual Basic

object.StopClock

Visual C++

void object::StopClock();

Delphi

object.StopClock;

The StopClock method syntax has these parts:

Part	Description
object	A TimeEdit object.
Remarks

This method cancels the effect of the StartClock method.


Time Edit Events

List of Events

The ProtoView Date Edit control supports the following events:

BeforeChange  Change  Click	KeyDown KeyPress KeyUp	MouseDown MouseMove MouseUp


BeforeChange

Occurs to indicate that the time in the TimeEdit control is about to be changed.

Syntax

Visual Basic

Private Sub Object_BeforeChange( )

Visual C++

void OnBeforeChangeObject( );

Delphi

Procedure BeforeChange(Sender);


Change

Occurs to indicate that the time in the TimeEdit control has changed.

Syntax

Visual Basic

Private Sub Object_BeforeChange( )

Visual C++

void OnBeforeChangeObject( );

Delphi

Procedure BeforeChange(Sender);


ProtoView TreeView Control

The ProtoView TreeView control is a hierarchical list box control suitable for displaying lists of items in a hierarchical manner. The TreeView control is similar to the Microsoft treeview control; however, the WinX version adds a number of important features.

New Features

The ProtoView TreeView control allows you to display the list of items in a multi-column fashion, using either fixed column width or fixed number of columns styles. See the MultiColumn Property for details.

In addition to multi-columns, you can display tabbed text in the TreeView control. Use the UseTabStops Property to enable tab stops for the control, and use the TabPoint Property to set tab stop positions.

Bitmaps are a special and flexible feature of the TreeView control. The TreeView control comes with a set of useful prebuilt bitmaps (Standard Pictures), or you can specify your own (Custom Pictures). You can specify a default picture (either a Standard or Custom Picture) that will be used for all items in the TreeView control. In addition, you can specify a default picture (again, either Standard or Custom) for a particular level of the list. And of course, you can specify a particular picture (either Standard or Custom) that is assigned to an individual item in the list. See the StandardDefaultPicture Property or CustomDefaultPicture Property for details.

Branch Items

To add items to the TreeView control, use the Branches property to obtain the main Branch Object, then use the Add Method of the Branch object to add items to the list. Likewise, you can use the Remove Method of the Branch object to remove items from the list. Most operations that affect the list of items in a TreeView control are done through the methods and properties of the Branch object.

A Branch object represents a single item and all its children (if any) in a TreeView control. You may manipulate an item through the methods and properties of a Branch object and you may add or remove child items through Branch object methods.

You can access the children of an item by using the Get method, and you can add child items to a Branch object by using the Add method.

 TreeView Properties

 TreeView Methods

 TreeView Events

 TreeView Branch Properties

 TreeView Branch Methods


TreeView Properties

List of Properties

The ProtoView TreeView control supports the following properties:

AllowInPlaceEditing AlwaysShowSelection  Appearance AutoOpen  BackColor BorderStyle Branches  ColumnWidth  Count  CustomDefaultPicture  CustomLevelPicture  Enabled EnableBitmaps	EnableLines  EnableMicroBitmaps  EnableToolTips Font ForeColor HorizontalExtent  hWnd Indent  IntegralHeight  LineColor MultiColumn  MultiColumnStyle  NumberOfColumns	ProportionalScrollBars  SelectedTextBackColor SelectedTextForeColor SelectMode  Sort StandardDefaultPicture  StandardLevelPicture  TabPoint  TabPointCount  ToolTipBackColor UseStateBitmaps  UseTabStops  VisibleCount


AllowInPlaceEditing

Returns or sets whether the TreeView will allow editing of text within items.

Syntax

Visual Basic

object.AllowInPlaceEditing = boolean

boolean = object. AllowInPlaceEditing

Visual C++

object.SetAllowInPlaceEditing ( boolean );

boolean = object.GetAllowInPlaceEditing( );

Delphi

object. AllowInPlaceEditing:= boolean;

boolean := object. AllowInPlaceEditing;

The AllowInPlaceEditing property syntax has these parts:

Part	Description
object	A TreeView object.
boolean	A Boolean expression that specifies whether the TreeView will allow editing of text within items.
Settings

The settings for boolean are:

Setting	Description
True	Items of the TreeView control can be edited.
False	(Default) Items of the TreeView control cannot be edited.


AlwaysShowSelection

Returns or sets the selection display state of a TreeView control.

Syntax

Visual Basic

object.AlwaysShowSelection = boolean

boolean = object.AlwaysShowSelection

Visual C++

object.SetAlwaysShowSelection ( boolean );

boolean = object.GetAlwaysShowSelection( );

Delphi

object.AlwaysShowSelection := boolean;

boolean := object.AlwaysShowSelection;

The AlwaysShowSelection property syntax has these parts:

Part	Description
object	A TreeView object.
boolean	A Boolean expression that specifies whether the selection state remains constant when the TreeView control looses focus.
Settings

The settings for boolean are:

Setting	Description
True	The selected item(s) in the TreeView control are always painted with the highlight background color.
False	(Default) The selected item(s) in the TreeView control are painted with the highlight background color only when the control has focus.
Remarks

This property should normally be set to False (the default value) to comply with Microsofts interface design guidelines for Windows programs.


AutoOpen

Returns or sets the auto open state of the TreeView control.

Syntax

Visual Basic

object.AutoOpen = boolean

boolean = object.AutoOpen

Visual C++

object.SetAutoOpen ( boolean );

boolean = object.GetAutoOpen( );

Delphi

object.AutoOpen := boolean;

boolean := object.AutoOpen;

The AutoOpen property syntax has these parts:

Part	Description
object	A TreeView object.
boolean	A Boolean expression that specifies whether the parent item will automatically open when a child is added.
Settings

The settings for boolean are:

Setting	Description
True	Items of the TreeView control automatically open the first time a child item is added to the item.
False	(Default) Items of the TreeView control do not automatically open when child items are added.
Remarks

The AutoOpen property only affects an item when the first child is added to it. This property is ignored for subsequent child items. This property is also ignored if any of the items parent items are closed or if the item is locked.


Branches

The Branches property returns the list of items in a TreeView control. Read only at run time, not available at design time.

Syntax

Visual Basic

branch = object.Branches

Visual C++

branch = object.GetBranches( );

Delphi

branch := object.Branches;

The object placeholder represents an object expression that evaluates to TreeView control.

Part	Description
object	A TreeView object.
branch	A branch object.
Remarks

The Branches property returns a Branch Object, through which you can manipulate items in a TreeView control.

The Branch object returned by this property is the main Branch. As such it does not correspond to a TreeView control item per se, as do all other Branches. However, you can use its methods to gain access to all other items in the TreeView control.


ColumnWidth

The ColumnWidth property sets or returns the width of an individual column in the TreeView control.

Syntax

Visual Basic

object.ColumnWidth = value

value = object.ColumnWidth

Visual C++

object.SetColumnWidth (value);

value = object.GetColumnWidth( );

Delphi

object.ColumnWidth:= value;

value := object.ColumnWidth;

The ColumnWidth property syntax has these parts:

Part	Description
object	A TreeView object.
value	A short integer or constant that determines the column width, in pixels, of an individual column in a multicolumn TreeView control.
Remarks

The ColumnWidth property only affects a multicolumn / fixed column width TreeView control. That is to say, the TreeView control must have its MultiColumn Property set to True, and its MultiColumnStyle Property set to 0 for this property to have any effect.


Count

The Count property returns the total number of items in a TreeView control. Read only at run time, not available at design time.

Syntax

Visual Basic

value = object.Count

Visual C++

value = object.GetCount( );

Delphi

value := object.Count;

Part	Description
object	A TreeView object.
value	A long integer which contains the number of items in the TreeView control.
Remarks

The Count property is a read only variable at run time.


CustomDefaultPicture

The CustomDefaultPicture property sets or returns the default picture displayed next to each item on the TreeView control.

Syntax

Visual Basic

object.CustomDefaultPicture = picture

picture = object.CustomDefaultPicture

Visual C++

object.SetCustomDefaultPicture (picture);

picture = object.GetCustomDefaultPicture( );

Delphi

object.CustomDefaultPicture:= picture;

picture := object.CustomDefaultPicture;

The CustomDefaultPicture property syntax has these parts:

Part	Description
object	A TreeView object.
picture	A picture object which contains a graphic, as described in Settings.
Settings

The settings for picture are:

Setting	Description
(None)	(Default) No picture.
(Bitmap, icon, metafile)	Specifies a graphic.  You can load the graphic from the Properties window at design time.  At run time, you can also set this property using the LoadPicture function on a bitmap, icon, or metafile.
Remarks

At design time, you can transfer a graphic with the Clipboard using the Copy, Cut, and Paste commands on the Edit menu.  At run time, you can use Clipboard methods such as GetData, SetData, and GetFormat with the nontext Clipboard constants vbCFBitmap, vbCFMetafile, and vbCFDIB, which are listed in the Visual Basic (VB) object library in the Object Browser.

When setting the CustomDefaultPicture property at design time, the graphic is saved and loaded with the form.  If you create an executable file, the file contains the image.

Note   At run time, the CustomDefaultPicture property can be set to any other object's Picture property, or you can assign it the graphic returned by the LoadPicture function.

The TreeView control only supports bitmap images in the CustomDefaultPicture property.

For the image to display, the EnableBitmaps Property must be set to TRUE. The way in which a custom bitmap is interpreted depends on the value of the UseStateBitmaps Property.

When a custom bitmap is assigned to an item, the TreeView control can interpret the bitmap as a normal or state formatted bitmap. A normal bitmap is displayed in its entirety next to the item. The interpretation of custom bitmaps depends on the setting of the UseStateBitmaps Property.

The picture to be displayed depends on a number of other settings. The picture displayed next to an item depends on the following rules:

CustomItemPicture Property

This picture will be displayed next to the item. If not set to None, this setting overrides all following properties.

StandardItemPicture Property

If the CustomItemPicture property is set to None, then the StandardItemPicture property specifies the picture that will be displayed next to the item. If not set to None, this setting overrides all following properties.

CustomLevelPicture Property

If both the CustomItemPicture and StandardItemPicture are set to None, then the picture displayed next to the item will depend on this setting. If not set to None for the level on which the item resides, the CustomLevelPicture will be displayed next to the item. If not set to None, this setting overrides all following properties.

StandardLevelPicture Property

If the CustomItemPicture, StandardItemPicture, and the CustomLevelPicture for the level on which this item resides are all set to None, then the picture displayed next to the item will depend on this setting. If not set to None for the level on which the item resides, the StandardLevelPicture will be displayed next to the item. If not set to None, this setting overrides all following properties.

CustomDefaultPicture Property

If all of the above properties are set to None, then the picture displayed next to the item will depend on this setting. If not set to None, the CustomDefaultPicture will be displayed next to the item. If not set to None, this setting overrides the StandardDefaultPicture.

StandardDefaultPicture Property

This is the default picture that will be displayed next to an item. This property is always set to a picture and can never be set to None. If all the above properties are set to None, then this will be the picture that will be displayed next to the item.


CustomLevelPicture

The CustomLevelPicture property sets or returns the default picture displayed next to each item on the TreeView control on a particular level.

Syntax

Visual Basic

object.CustomLevelPicture(level) = picture

picture = object.CustomLevelPicture(level)

Visual C++

object.SetCustomLevelPicture (level, picture);

picture = object.GetCustomLevelPicture(level);

Delphi

object.CustomLevelPicture[level] := picture;

picture := object.CustomLevelPicture[level];

The CustomLevelPicture property syntax has these parts:

Part	Description
object	A TreeView object.
level	A short integer that specifies the level for which the default picture is to be set.
picture	A picture object which contains a graphic, as described in Settings.
Settings

The settings for picture are:

Setting	Description
(None)	(Default) No picture.
(Bitmap, icon, metafile)	Specifies a graphic.  You can load the graphic from the Properties window at design time.  At run time, you can also set this property using the LoadPicture function on a bitmap, icon, or metafile.
Remarks

At design time, you can transfer a graphic with the Clipboard using the Copy, Cut, and Paste commands on the Edit menu.  At run time, you can use Clipboard methods such as GetData, SetData, and GetFormat with the nontext Clipboard constants vbCFBitmap, vbCFMetafile, and vbCFDIB, which are listed in the Visual Basic (VB) object library in the Object Browser.

When setting the CustomLevelPicture property at design time, the graphic is saved and loaded with the form.  If you create an executable file, the file contains the image.

Note   At run time, the CustomLevelPicture property can be set to any other object's Picture property, or you can assign it the graphic returned by the LoadPicture function.

The TreeView control only supports bitmap images in the CustomLevelPicture property.

For the image to display, the EnableBitmaps Property must be set to TRUE. The way in which a custom bitmap is interpreted depends on the value of the UseStateBitmaps Property.

When a custom bitmap is assigned to an item, the TreeView control can interpret the bitmap as a normal or state formatted bitmap. A normal bitmap is displayed in its entirety next to the item. The interpretation of custom bitmaps depends on the setting of the UseStateBitmaps Property.

The picture to be displayed depends on a number of other settings. The picture displayed next to an item depends on the following rules:

CustomItemPicture Property

This picture will be displayed next to the item. If not set to None, this setting overrides all following properties.

StandardItemPicture Property

If the CustomItemPicture property is set to None, then the StandardItemPicture property specifies the picture that will be displayed next to the item. If not set to None, this setting overrides all following properties.

CustomLevelPicture Property

If both the CustomItemPicture and StandardItemPicture are set to None, then the picture displayed next to the item will depend on this setting. If not set to None for the level on which the item resides, the CustomLevelPicture will be displayed next to the item. If not set to None, this setting overrides all following properties.

StandardLevelPicture Property

If the CustomItemPicture, StandardItemPicture, and the CustomLevelPicture for the level on which this item resides are all set to None, then the picture displayed next to the item will depend on this setting. If not set to None for the level on which the item resides, the StandardLevelPicture will be displayed next to the item. If not set to None, this setting overrides all following properties.

CustomDefaultPicture Property

If all of the above properties are set to None, then the picture displayed next to the item will depend on this setting. If not set to None, the CustomDefaultPicture will be displayed next to the item. If not set to None, this setting overrides the StandardDefaultPicture.

StandardDefaultPicture Property

This is the default picture that will be displayed next to an item. This property is always set to a picture and can never be set to None. If all the above properties are set to None, then this will be the picture that will be displayed next to the item.


EnableBitmaps

Returns or sets a value that determines whether a TreeView control will display images next to each item in the control.

Syntax

Visual Basic

object.EnableBitmaps = boolean

boolean = object.EnableBitmaps

Visual C++

object.SetEnableBitmaps (boolean);

boolean = object.GetEnableBitmaps( );

Delphi

object.EnableBitmap := boolean;

boolean:= object.EnableBitmaps;

The EnableBitmaps property syntax has these parts:

Part	Description
object	A TreeView object.
boolean	A Boolean expression that specifies whether object will display images next to each item.
Settings

The settings for boolean are:

Setting	Description
True	(Default)  The TreeView will display images next to items.
False	The TreeView will display no images next to items.
Remarks

The EnableBitmaps property allows the TreeView control to display an image next to each item at run time. The item to be displayed depends on a number of other settings. The way in which a custom bitmap is interpreted depends on the value of the UseStateBitmaps Property.

When a custom bitmap is assigned to an item, the TreeView control can interpret the bitmap as a normal or state formatted bitmap. A normal bitmap is displayed in its entirety next to the item. The interpretation of custom bitmaps depends on the setting of the UseStateBitmaps Property.

The picture to be displayed depends on a number of other settings. The picture displayed next to an item depends on the following rules:

CustomItemPicture Property

This picture will be displayed next to the item. If not set to None, this setting overrides all following properties.

StandardItemPicture Property

If the CustomItemPicture property is set to None, then the StandardItemPicture property specifies the picture that will be displayed next to the item. If not set to None, this setting overrides all following properties.

CustomLevelPicture Property

If both the CustomItemPicture and StandardItemPicture are set to None, then the picture displayed next to the item will depend on this setting. If not set to None for the level on which the item resides, the CustomLevelPicture will be displayed next to the item. If not set to None, this setting overrides all following properties.

StandardLevelPicture Property

If the CustomItemPicture, StandardItemPicture, and the CustomLevelPicture for the level on which this item resides are all set to None, then the picture displayed next to the item will depend on this setting. If not set to None for the level on which the item resides, the StandardLevelPicture will be displayed next to the item. If not set to None, this setting overrides all following properties.

CustomDefaultPicture Property

If all of the above properties are set to None, then the picture displayed next to the item will depend on this setting. If not set to None, the CustomDefaultPicture will be displayed next to the item. If not set to None, this setting overrides the StandardDefaultPicture.

StandardDefaultPicture Property

This is the default picture that will be displayed next to an item. This property is always set to a picture and can never be set to None. If all the above properties are set to None, then this will be the picture that will be displayed next to the item.


EnableLines

Returns or sets a value that determines whether a TreeView control will display lines connecting parent items to their children.

Syntax

Visual Basic

object.EnableLines = boolean

boolean = object.EnableLines

Visual C++

object.SetEnableLines(boolean);

boolean = object.GetEnableLines( );

Delphi

object.EnableLines := boolean;

boolean := object.EnableLines;

The EnableLines property syntax has these parts:

Part	Description
object	A TreeView object.
boolean	A Boolean expression that specifies whether object will display lines connecting parent items to their children.
Settings

The settings for boolean are:

Setting	Description
True	(Default) Causes object to display lines connecting parent items to their children.
False	Prevents object from displaying lines connecting parent items to their children.


EnableMicroBitmaps

Returns or sets a value that determines whether a TreeView control will display a box containing either a + or - next to each item. A box with a + indicates that a closed item has children. Clicking on the + with the mouse will cause the item to open (display its children in the TreeView control). A box with a - indicates that the item has children and is open. Clicking on the - will cause the item to close.

Syntax

Visual Basic

object.EnableMicroBitmaps = boolean

boolean = object.EnableMicroBitmaps

Visual C++

object.SetEnableMicroBitmaps(boolean);

boolean = object.GetEnableMicroBitmaps( );

Delphi

object.EnableMicroBitmaps := boolean;

boolean := object.EnableMicroBitmaps;

The EnableMicroBitmaps property syntax has these parts:

Part	Description
object	A TreeView object.
boolean	A Boolean expression that specifies whether object will display a box containing either a + or - next to each item.
Settings

The settings for boolean are:

Setting	Description
True	(Default) Causes object to display a box containing either a + or - next to each item.
False	Prevents object from displaying display a box containing either a + or - next to each item.


EnableToolTips

Returns or sets a value that determines whether a TreeView control will display tooltips when the mouse moves over an item.

Syntax

Visual Basic

object.EnableToolTips = boolean

boolean = object.EnableToolTips

Visual C++

object.SetEnableToolTips(boolean);

boolean = object.GetEnableToolTips( );

Delphi

object.EnableToolTips := boolean;

boolean := object.EnableToolTips;

The EnableToolTips property syntax has these parts:

Part	Description
object	A TreeView object.
boolean	A Boolean expression that specifies whether object will display tooltips for items.
Settings

The settings for boolean are:

Setting	Description
True	(Default) Causes object to display tooltips for each item.
False	Prevents object from displaying tooltips each item.


HorizontalExtent

Returns or sets a value that determines the logical width of a TreeView control.

Syntax

Visual Basic

object.HorizontalExtent = value

value = object.HorizontalExtent

Visual C++

object.SetHorizontalExtent(value);

value = object.GetHorizontalExtent( );

Delphi

object.HorizontalExtent := value;

value := object.HorizontalExtent;

The HorizontalExtent property syntax has these parts:

Part	Description
object	A TreeView object.
value	A short integer that specifies the logical width of a TreeView control. The logical width is specified in pixels.
Remarks

The HorizontalExtent property specifies the logical width of a TreeView at run time.

If the logical width of the control is less than the physical width (i.e., the actual width of the control in pixels as it appears on screen), then the HorizontalExtent property has no effect. If the logical width is greater than the physical width, a horizontal scroll bar appears at the bottom of the control to allow the user to scroll the contents of the TreeView control horizontally.


Indent

The Indent property sets or returns the amount of space, in pixels, that each subsequent child level is indented from its parent in the TreeView control.

Syntax

Visual Basic

object.Indent = value

value = object.Indent

Visual C++

object.SetIndent(value);

value = object.GetIndent( );

Delphi

object.Indent:= value;

value := object.Indent;

The Indent property syntax has these parts:

Part	Description
object	A TreeView object.
value	A short integer or constant that determines the amount of space, in pixels, that each subsequent child level is indented from its parent in the TreeView control.


IntegralHeight

Returns or sets a value indicating if the control displays partial items. Read only at run time.

Syntax

Visual Basic

object.IntegralHeight = boolean

boolean = object.IntegralHeight

Visual C++

object.SetIntegralHeight(boolean);

boolean = object.GetIntegralHeight( );

Delphi

object.IntegralHeight := boolean;

boolean := object.IntegralHeight;

Part	Description
object	A TreeView object.
boolean	A Boolean expression that specifies whether object will resize itself to hide partial items.
Settings

The settings for boolean are:

Setting	Description
True	(Default) The TreeView control resizes itself to display only complete items.
False	The TreeView control doesn't resize itself even if the item is too tall to display completely.


LineColor

LineColor returns or sets the foreground color used color used to paint lines connecting parent items to their children in a TreeView Control object.

Syntax

Visual Basic

object. LineColor = color

color = object. LineColor

Visual C++

object.SetLineColor(color);

color = object.GetLineColor( );

Delphi

object. LineColor:= color;

color:= object. LineColor;

The LineColor property syntax has these parts:

Part	Description
object	An object expression that evaluates to a TreeView control.
color	A value or constant that determines the color used to paint lines.
Remarks

See the section Notes About Colors.


MultiColumn

Returns or sets a value indicating if the TreeView control displays the list of items in a multicolumn fashion. Read only at run time.

Syntax

Visual Basic

object.MultiColumn = boolean

boolean = object.MultiColumn

Visual C++

object.SetMultiColumn(boolean);

boolean = object.GetMultiColumn( );

Delphi

object.MultiColumn:= boolean;

boolean := object.MultiColumn;

Part	Description
object	A TreeView object.
boolean	A Boolean expression that specifies whether object will display items in a multicolumn fashion.
Settings

The settings for MultiColumn are:

Settings

The settings for boolean are:

Setting	Description
True	The TreeView control displays its items in a multicolumn fashion.
False	(Default) The TreeView control displays its items in the normal fashion.
Remarks

The TreeView control can display multicolumn lists in one of two modes: fixed column width mode and variable column width mode.

In the fixed column width mode (see MultiColumnStyle Property), you specify the width of each column using the ColumnWidth Property. In this mode, each column will remain a constant width no matter how the TreeView control is sized.

In the variable column width mode, you specify the number of columns to be displayed on the TreeView control by setting the NumberOfColumns Property. In this mode, the number of columns displayed on the TreeView control remains constant no matter how the TreeView control is sized.


MultiColumnStyle

Returns or sets a value indicating the style of the multicolumn display.

Syntax

Visual Basic

object.MultiColumnStyle = value

value = object.MultiColumnStyle

Visual C++

object.SetMultiColumnStyle(value);

value = object.GetMultiColumnStyle( );

Delphi

object.MultiColumnStyle:= value;

value:= object.MultiColumnStyle;

The MultiColumnStyle property syntax has these parts:

Part	Description
object	A TreeView object.
value	A constant that determines the multicolumn style, as described in Settings.
Settings

The settings for value are:

Setting	Description
pvtMuliColFixedWidth - 0	(Default) Fixed. Specifies that the TreeView control displays its items in a fixed column width mode
pvtMultiColVariableWidth - 1	Variable. Specifies that the TreeView control displays its items in a variable column width mode.
Remarks

The TreeView control can display multicolumn lists in one of two modes: fixed column width mode and variable column width mode.

In the fixed column width mode, you specify the width of each column using the ColumnWidth Property. In this mode, each column will remain a constant width no matter how the TreeView control is sized.

In the variable column width mode, you specify the number of columns to be displayed on the TreeView control by setting the NumberOfColumns Property.  In this mode, the number of columns displayed on the TreeView control remains constant no matter how the TreeView control is sized.


NumberOfColumns

The NumberOfColumns property sets or returns the number of columns displayed in the TreeView control.

Syntax

Visual Basic

object.NumberOfColumns = value

value = object.NumberOfColumns

Visual C++

object.SetNumberOfColumns(value);

value = object.GetNumberOfColumns( );

Delphi

object.NumberOfColumns:= value;

value:= object.NumberOfColumns;

The NumberOfColumns property syntax has these parts:

Part	Description
object	A TreeView object.
value	A short integer or constant specifies the number of columns displayed in a multicolumn TreeView control.
Remarks

The NumberOfColumns property only affects a multicolumn / variable column width TreeView control. That is to say, the TreeView control must have its MultiColumn Property set to True, and its MultiColumnStyle Property set to 1 for this property to have any effect.


ProportionalScrollBars

The ProportionalScrollBars property sets or returns a value which specifies whether or not the TreeView controls scroll bars are sized proportionally to the contents of the control.

Syntax

Visual Basic

object.ProportionalScrollBars = boolean

boolean = object.ProportionalScrollBars

Visual C++

object.SetProportionalScrollBars(boolean);

boolean = object.GetProportionalScrollBars( );

Delphi

object.ProportionalScrollBars:= boolean;

boolean:= object.ProportionalScrollBars;

The ProportionalScrollBars property syntax has these parts:

Part	Description
object	A TreeView object.
boolean	A Boolean expression that determines whether the TreeView control displays its scroll bars proportionally sized to its contents.
Settings

The settings for boolean are:

Setting	Description
True	(Default) The TreeView control displays its scroll bars proportionally sized to its contents.
False	The TreeView control displays its scroll bars in the normal fashion.


SelectedTextBackColor

SelectedTextBackColor returns or sets the background color used to display selected items in a TreeView Control object.

Syntax

Visual Basic

object.SelectedTextBackColor = color

color = object.SelectedTextBackColor

Visual C++

object.SetSelectedTextBackColor(color);

color = object.GetSelectedTextBackColor( );

Delphi

object.SelectedTextBackColor:= color;

color:= object.SelectedTextBackColor;

The SelectedTextBackColor property syntax has these parts:

Part	Description
object	An object expression that evaluates to a TreeView control.
color	A value or constant that determines the selected items background color.
Remarks

See the section Notes About Colors.


SelectedTextForeColor

SelectedTextForeColor returns or sets the foreground color used to display selected items in a TreeView Control object.

Syntax

Visual Basic

object. SelectedTextForeColor  = color

color = object. SelectedTextForeColor

Visual C++

object.SetSelectedTextForeColor(color);

color = object.GetSelectedTextForeColor( );

Delphi

object. SelectedTextForeColor:= color;

color:= object. SelectedTextForeColor;

The SelectedTextForeColor property syntax has these parts:

Part	Description
object	An object expression that evaluates to a TreeView control.
color	A value or constant that determines the selected items foreground color.
Remarks

See the section Notes About Colors.


SelectMode

Returns or sets a value indicating whether a user can make multiple selections in TreeView control and how the multiple selections can be made. Read only at run time.

Syntax

Visual Basic

object.SelectMode = value

value = object.SelectMode

Visual C++

object.SetSelectMode(value);

value = object.GetSelectMode( );

Delphi

object.SelectMode:= value;

value:= object.SelectMode;

The SelectMode property syntax has these parts:

Part	Description
object	A TreeView object.
value	A short integer that determines the selection mode in the TreeView.
Settings

The settings for value are:

Setting	Description
pvtSelectDefault - 0	(Default) Multiple selection isn't allowed.
pvtSelectSimple - 1	Simple multiple selection.  A mouse click or pressing the SPACEBAR selects or deselects an item in the list.  (Arrow keys move the focus.)
pvtSelectMultiple - 2	Extended multiple selection.  Pressing SHIFT and clicking the mouse or pressing SHIFT and one of the arrow keys (UP ARROW, DOWN ARROW, LEFT ARROW, and RIGHT ARROW) extends the selection from the previously selected item to the current item.  Pressing CTRL and clicking the mouse selects or deselects an item in the list.


Sort

Returns a value indicating whether the elements of a control are automatically sorted alphabetically. Read only at run time.

Syntax

Visual Basic

boolean = object.Sort

Visual C++

boolean = object.GetSort( );

Delphi

boolean:= object.Sort;

Part	Description
object	A TreeView object.
boolean	A Boolean expression that specifies whether object will sort items in the list.
Settings

The settings for boolean are:

Setting	Description
True	List items are sorted alphabetically (case-insensitive).
False	(Default) List items aren't sorted alphabetically.
Remarks

When this property is True, Visual Basic handles almost all necessary string processing to maintain alphabetic order, including changing the index numbers for items as required by the addition or removal of items.

Note   Using the Add method to add an element to a specific location in the list may violate the sort order, and subsequent additions may not be correctly sorted.


StandardDefaultPicture

Returns or sets a value indicating the default picture that will be displayed next to an item in the TreeView control.

Syntax

Visual Basic

object.StandardDefaultPicture = value

value = object.StandardDefaultPicture

Visual C++

object.SetStandardDefaultPicture(value);

value = object.GetStandardDefaultPicture( );

Delphi

object.StandardDefaultPicture:= value;

value:= object.StandardDefaultPicture;

The StandardDefaultPicture property syntax has these parts:

Part	Description
object	A TreeView object.
value	A constant that determines the default picture that will be displayed next to an item in the TreeView control, as described in Settings.
Settings

The settings for value are:

Setting	Description
pvtNone	No picture.
pvtpicFolders	(Default) Folder Picture.
pvtpicBoxes1	Boxes #1 Picture.
pvtpicDocument	Document Picture.
pvtpicHardDisk	Hard Disk Picture.
pvtpicProgram	Program File Picture.
pvtpicSystemFile	System File Picture.
pvtpicBoxes2	Boxes #2 Picture.
pvtpicBoxes3	Boxes #3 Picture.
pvtpicASCIIFile	ASCII File Picture.
pvtpicHelpFile	Help File Picture.
Remarks

The EnableBitmaps Property allows the TreeView control to display an image next to each item at run time.

When a custom bitmap is assigned to an item, the TreeView control can interpret the bitmap as a normal or state formatted bitmap. A normal bitmap is displayed in its entirety next to the item. The interpretation of custom bitmaps depends on the setting of the UseStateBitmaps Property.

The picture to be displayed depends on a number of other settings. The picture displayed next to an item depends on the following rules:

CustomItemPicture Property

This picture will be displayed next to the item. If not set to None, this setting overrides all following properties.

StandardItemPicture Property

If the CustomItemPicture property is set to None, then the StandardItemPicture property specifies the picture that will be displayed next to the item. If not set to None, this setting overrides all following properties.

CustomLevelPicture Property

If both the CustomItemPicture and StandardItemPicture are set to None, then the picture displayed next to the item will depend on this setting. If not set to None for the level on which the item resides, the CustomLevelPicture will be displayed next to the item. If not set to None, this setting overrides all following properties.

StandardLevelPicture Property

If the CustomItemPicture, StandardItemPicture, and the CustomLevelPicture for the level on which this item resides are all set to None, then the picture displayed next to the item will depend on this setting. If not set to None for the level on which the item resides, the StandardLevelPicture will be displayed next to the item. If not set to None, this setting overrides all following properties.

CustomDefaultPicture Property

If all of the above properties are set to None, then the picture displayed next to the item will depend on this setting. If not set to None, the CustomDefaultPicture will be displayed next to the item. If not set to None, this setting overrides the StandardDefaultPicture.

StandardDefaultPicture Property

This is the default picture that will be displayed next to an item. This property is always set to a picture and can never be set to None. If all the above properties are set to None, then this will be the picture that will be displayed next to the item.


StandardLevelPicture

Returns or sets a value indicating the default picture that will be displayed next to an item in the TreeView control on a particular level.

Syntax

Visual Basic

object.StandardLevelPicture(level)  = value

value = object.StandardLevelPicture(level)

Visual C++

object.SetStandardLevelPicture(level, value);

value = object.GetStandardLevelPicture(level);

Delphi

object.StandardLevelPicture[level]:= value;

value:= object.StandardLevelPicture[level];

The StandardLevelPicture property syntax has these parts:

Part	Description
object	A TreeView object.
level	A numeric expression that specifies the level for which the default picture is to be set.
Value	A constant that determines the default picture that will be displayed next to an item in the TreeView control, as described in Settings.
Settings

The settings for value are:

Setting	Description
pvtNone	No picture.
pvtpicFolders	(Default) Folder Picture.
pvtpicBoxes1	Boxes #1 Picture.
pvtpicDocument	Document Picture.
pvtpicHardDisk	Hard Disk Picture.
pvtpicProgram	Program File Picture.
pvtpicSystemFile	System File Picture.
pvtpicBoxes2	Boxes #2 Picture.
pvtpicBoxes3	Boxes #3 Picture.
pvtpicASCIIFile	ASCII File Picture.
pvtpicHelpFile	Help File Picture.
Remarks

The EnableBitmaps Property allows the TreeView control to display an image next to each item at run time.

When a custom bitmap is assigned to an item, the TreeView control can interpret the bitmap as a normal or state formatted bitmap. A normal bitmap is displayed in its entirety next to the item. The interpretation of custom bitmaps depends on the setting of the UseStateBitmaps Property.

The picture to be displayed depends on a number of other settings. The picture displayed next to an item depends on the following rules:

CustomItemPicture Property

This picture will be displayed next to the item. If not set to None, this setting overrides all following properties.

StandardItemPicture Property

If the CustomItemPicture property is set to None, then the StandardItemPicture property specifies the picture that will be displayed next to the item. If not set to None, this setting overrides all following properties.

CustomLevelPicture Property

If both the CustomItemPicture and StandardItemPicture are set to None, then the picture displayed next to the item will depend on this setting. If not set to None for the level on which the item resides, the CustomLevelPicture will be displayed next to the item. If not set to None, this setting overrides all following properties.

StandardLevelPicture Property

If the CustomItemPicture, StandardItemPicture, and the CustomLevelPicture for the level on which this item resides are all set to None, then the picture displayed next to the item will depend on this setting. If not set to None for the level on which the item resides, the StandardLevelPicture will be displayed next to the item. If not set to None, this setting overrides all following properties.

CustomDefaultPicture Property

If all of the above properties are set to None, then the picture displayed next to the item will depend on this setting. If not set to None, the CustomDefaultPicture will be displayed next to the item. If not set to None, this setting overrides the StandardDefaultPicture.

StandardDefaultPicture Property

This is the default picture that will be displayed next to an item. This property is always set to a picture and can never be set to None. If all the above properties are set to None, then this will be the picture that will be displayed next to the item.


TabPoint

The TabPoint property sets or returns the location of tab stops in the TreeView control.

Syntax

Visual Basic

object.TabPoint(index)  = value

value = object.TabPoint(index)

Visual C++

object.SetTabPoint(index, value);

value = object.GetTabPoint(index);

Delphi

object.TabPoint[index]:= value;

value:= object.TabPoint[index];

The TabPoint property syntax has these parts:

Part	Description
object	A TreeView object.
index	A numeric expression or constant that specifies which tab point to set or return.
value	A short integer or constant specifies the tab stop location, in dialog box units, from the left side of the TreeView control.
Remarks

The TreeView control must have its UseTabStops Property set to True for this property to have any effect.

If no tab stops are specified for a control, the default tab stop is two dialog box units. If only one tab stop is specified, the list box will have tab stops separated by the distance specified by that single tab stop. If more than a single tab stop is defined, a tab stop will be set for each value specified.

A dialog box unit is a horizontal or vertical distance. One horizontal dialog box unit is equal to 0.25 of the current dialog box base-width unit. These units are computed based on the height and width of the current system font. The GetDialogBaseUnits function returns the current dialog box base units, in pixels.


TabPointCount

The TabPointCount property returns the number of tab stops defined in the TreeView control. Read only at run time, not available at design time.

Syntax

Visual Basic

value = object.TabPointCount

Visual C++

value = object.GetTabPointCount( );

Delphi

value:= object.TabPointCount;

The TabPointCount property syntax has these parts:

Part	Description
object	A TreeView object.
value	A short integer which returns the number of tab stops defined in the TreeView.
Remarks

The TreeView control must have its UseTabStops Property set to True for this property to have any meaning.

If no tab stops are specified for a control, the default tab stop is two dialog box units. If only one tab stop is specified, the list box will have tab stops separated by the distance specified by that single tab stop. If more than a single tab stop is defined, a tab stop will be set for each value specified.

A dialog box unit is a horizontal or vertical distance. One horizontal dialog box unit is equal to 0.25 of the current dialog box base-width unit. These units are computed based on the height and width of the current system font. The GetDialogBaseUnits function returns the current dialog box base units, in pixels.


ToolTipBackColor

ToolTipBackColor returns or sets the background color used to display tool tips in a TreeView Control object.

Syntax

Visual Basic

object.ToolTipBackColor = color

color = object.ToolTipBackColor

Visual C++

object.SetToolTipBackColor(color);

color = object.GetToolTipBackColor( );

Delphi

object.ToolTipBackColor:= color;

color:= object.ToolTipBackColor;

The ToolTipBackColor property syntax has these parts:

Part	Description
object	An object expression that evaluates to a TreeView control.
color	A value or constant that determines the tool tip's background color.
Remarks

See the section Notes About Colors.


UseStateBitmaps

The UseStateBitmaps property sets or returns a boolean value indicating whether or not the TreeView control uses state format bitmaps.

Syntax

Visual Basic

object.UseStateBitmaps  = boolean

boolean = object.UseStateBitmaps

Visual C++

object.SetUseStateBitmaps(boolean);

boolean = object.GetUseStateBitmaps( );

Delphi

object.UseStateBitmaps:= boolean;

boolean:= object.UseStateBitmaps;

The UseStateBitmaps property syntax has these parts:

Part	Description
object	A TreeView object.
boolean	A Boolean expression that specifies whether the TreeView control interprets custom bitmaps as state format bitmaps, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	(Default) The TreeView control control interprets custom bitmaps as state format bitmaps.
False	The TreeView control control interprets custom bitmaps as normal bitmaps.
Remarks

When a custom bitmap is assigned to an item, the TreeView control can interpret the bitmap as a normal or state formatted bitmap. A normal bitmap is displayed in its entirety next to the item.

A state formatted bitmap is a bitmap that consists of three images, each placed next to each other. Only one of the three images is displayed at any given time, depending on the state of the item. The first image is displayed when the Branch object has no children, the second image is displayed when the Branch object has children and is in the open state, and the third image is displayed when the Branch object has children and is in the closed state. Each image must be the same size as the other two. Thus, only one third of the entire bitmap is displayed at any given time.


UseTabStops

Returns a value indicating whether the TreeView control recognizes and expands tab characters when drawing its strings. The default tab positions are 2 dialog units. (A dialog unit is a horizontal or vertical distance. One horizontal dialog unit is equal to one-fourth of the current dialog base width unit. The dialog base units are computed based on the height and width of the current system font. The GetDialogBaseUnits Windows function returns the current dialog base units in pixels.) Read only at run time.

Syntax

Visual Basic

object.UseTabStops = boolean

boolean = object.UseTabStops

Visual C++

object.SetUseTabStops(boolean);

boolean = object.GetUseTabStops( );

Delphi

object.UseTabStops:= boolean;

boolean:= object.UseTabStops;

Part	Description
object	A TreeView object.
boolean	A Boolean expression that specifies whether the TreeView control will use tabstops.
Settings

The settings for boolean are:

Setting	Description
True	The TreeView control recognizes and expands tab characters when drawing its strings.
False	(Default) The TreeView control does not recognize and expand tab characters when drawing its strings.


VisibleCount

The VisibleCount property returns the total number of visible items in a TreeView control. Read only at run time, not available at design time.

Syntax

Visual Basic

value = object. VisibleCount

Visual C++

value = object.GetVisibleCount( );

Delphi

value:= object. VisibleCount;

Part	Description
object	A TreeView object.
value	A long integer that returns the number of visible items in the TreeView control.
Remarks

Visible items are items whose parent items are all open, as opposed to an invisible item which has one or more of its parent items closed.


TreeView Methods

List of Methods

The ProtoView TreeView control supports the following methods:

AboutBox BeginInPlaceEdit  ClearTabStops	EndInPlaceEdit  Find	GetEditHWND HitTest


BeginInPlaceEdit

Puts the current Branch object into in-place edit mode.

Syntax

Visual Basic

object.BeginInPlaceEdit

Visual C++

object.BeginInPlaceEdit( );

Delphi

object.BeginInPlaceEdit;

The BeginInPlaceEdit method syntax has these parts:

Part	Description
object	A TreeView object.


ClearTabStops

Clears all tab stops in a TreeView Control.

Syntax

Visual Basic

object.ClearTabStops

Visual C++

object.ClearTabStops( );

Delphi

object.ClearTabStops;

The ClearTabStops method syntax has these parts:

Part	Description
object	A TreeView object.
Remarks

To remove one tab stop from a TreeView control, use the TabPoint Property to set the tab stop to -1.


EndInPlaceEdit

Ends the in-place editing of the current Branch object.

Syntax

Visual Basic

object.EndInPlaceEdit

Visual C++

object.EndInPlaceEdit( );

Delphi

object.EndInPlaceEdit;

The EndInPlaceEdit method syntax has these parts:

Part	Description
object	A TreeView object.


Find

Searches for a specific item in a TreeView control.

Syntax

Visual Basic

object.Find relationship, relative, text

Visual C++

object.Find( relationship, relative, text );

Delphi

object.Find(relationship, relative, text );

The Find method syntax has these parts:

Part	Description
object	A TreeView object.
relationship	A constant that specifies how the search for the item will proceed. This value can take on one of the manifest constants described in Settings.
relative	A Branch object that specifies the relative item.
text	A string that specifies the text string to search for.
Settings

The settings for relationship are:

pvtFindNext

Searches for the item following relative whose Text Property begins with text string.

pvtFindNextExact

Searches for the item following relative whose Text Property exactly matches text string.

pvtFindPrevious

Searches for the item prior to relative whose Text Property begins with text string.

pvtFindPreviousExact

Searches for the item prior to relative whose Text Property exactly matches text string.

pvtFindNextSibling

Searches for the item following relative that shares the same parent as relative and whose Text Property begins with text string.

pvtFindNextSiblingExact

Searches for the item following relative that shares the same parent as relative and whose Text Property exactly matches text string.

pvtFindPreviousSibling

Searches for the item prior to relative that shares the same parent as relative and whose Text Property begins with text string.

pvtFindPreviousSiblingExact

Searches for the item prior to relative that shares the same parent as relative and whose Text Property exactly matches text string.

pvtFindNextVisible

Searches for the item following relative that is visible (i.e., an item whose parents areall open) and whose Text Property begins with text string.

pvtFindNextVisibleExact

Searches for the item following relative that is visible (i.e., an item whose parents areall open) and whose Text Property exactly matches text string.

pvtFindPreviousVisible

Searches for the item prior to relative that is visible (i.e., an item whose parents areall open) and whose Text Property begins with text string.

pvtFindPreviousVisibleExact

Searches for the item prior to relative that is visible (i.e., an item whose parents areall open) and whose Text Property exactly matches text string.

Remarks

The Find method returns a Branch Object that matches the search criteria. If no item matches the search criteria, an empty Branch object is returned.

You can use the Get method to obtain a Branch object that has a specific hierarchical relationship to a given item.

Visual Basic Example

This example searches the tree for the first Branch object that matches a partial string Ar in a TreeView control. That is to say, the Find method will find the first node in the tree that has a caption that begins with Ar. To try this example, create a form and place a TreeView control on the form. Set the Name property of the control to PTreeView1. Create a menu for the form that contains the command Find (mnuFind). Paste the Sub procedure into the Declarations section of the form, and press F5.

Private Sub mnuFind_Click ()
Dim node As Branch

Set node = PTreeView1.Find(pvtFindNext, NULL, Ar)

End Sub


GetEditHWND

Returns a handle to a the edit control where in-place editing for a TreeView control occurs.

Syntax

Visual Basic

hWnd = object.GetEditHWND

Visual C++

hWnd = object.GetEditHWND( );

Delphi

hWnd := object.GetEditHWND;

The GetEditHWND method syntax has these parts:

Part	Description
object	A TreeView object.
hWnd	A handle which contains the windows handle of the edit control.
Remarks

The Microsoft Windows operating environment identifies each form and control in an application by assigning it a handle, or hWnd. The hWnd property is used with Windows API calls. Many Windows operating environment functions require the hWnd of the active window as an argument.

Note  Because the value of this property can change while a program is running, never store the hWnd value in a variable.


HitTest

Returns a branch object from a specific point.

Syntax

Visual Basic

Branch = object.HitTest (x, y)

Visual C++

Branch = object. HitTest(x, y);

Delphi

Branch:= object. HitTest(x, y);

The HitTest method syntax has these parts:

Part	Description
object	A TreeView object.
Branch	A handle which contains the windows handle of the edit control.
x, y	The x and y coodinates expressed in pixels.
Remarks

The HitTest method returns a Branch Object that is located at the x-y coordinate. If no item exists at the point, an empty Branch object is returned.


TreeView Events

List of Events

The ProtoView TreeView control supports the following events:

AfterCollapse AfterDBAddNode AfterExpand  AfterSelChange  BeforeCollapse  BeforeDBAddNode BeforeExpand	BeforeSelChange DeleteItem InPlaceEditBegin InPlaceEditEnd KeyDown KeyPress KeyUp	LButtonDblClick  LButtonDown LButtonUp  RButtonDblClick  RButtonDown RButtonUp


AfterCollapse

The AfterCollapse event is fired after an item has been collapsed (closed).

Syntax

Visual Basic

Private Sub object_AfterCollapse(Node)

Visual C++

OnAfterCollapseObject(Node);

Delphi

Procedure AfterCollapse(Sender, Node);

The AfterCollapse event syntax has these parts:

Part	Description
Node	A Branch object that has been collapsed.
Remarks

When a node is collapsed in the TreeView control, the TreeView control fires the BeforeCollapse event before the node is collapsed. The user may cancel the collapse event by setting the bProcessed variable to True. If the collapse event is not canceled, the TreeView control collapses the item, and then fires an AfterCollapse event.


AfterDBAddNode

The AfterDBAddNode event is fired after an item has been added to the TreeView from a data source.

Syntax

Visual Basic

Private Sub object_AfterDBAddNode(Node)

Visual C++

OnAfterDBAddNodeObject(Node);

Delphi

Procedure AfterDBAddNode(Sender, Node);

The AfterDBAddNode event syntax has these parts:

Part	Description
Node	A Branch object that has been added.
Remarks

When a TreeView control is bound to a data source, each item added from the data source has the Before and After DBAddNode event fired to allow you to customize the branch.


AfterExpand

The AfterExpand event is fired after an item has been expanded (opened).

Syntax

Visual Basic

Private Sub object_AfterExpand(Node)

Visual C++

OnAfterExpandObject(Node);

Delphi

Procedure AfterExpand(Sender, Node);

The AfterExpand event syntax has these parts:

Part	Description
Node	A Branch object that is being expanded.
Remarks

When a node is expanded in the TreeView control, the TreeView control fires the BeforeExpand event before the node is expanded. The user may cancel the expand event by setting the bProcessed variable to True. If the expand event is not canceled, the TreeView control expands the item, and then fires an AfterExpand event.


AfterSelChange

The AfterSelChange event is fired before an item is selected.

Syntax

Visual Basic

Private Sub object_AfterSelChange(Node)

Visual C++

OnAfterSelChangeObject(Node);

Delphi

Procedure AfterSelChange(Sender, Node);

The AfterSelChange event syntax has these parts:

Part	Description
Node	A Branch object that is has been selected.
Remarks

When a node is selected in the TreeView control, the TreeView control fires the BeforeSewlChange event before the selection is made. The user may cancel the selection change by setting the bProcessed variable to True. If the selection change is not canceled, the TreeView control selects the item, and then fires an AfterSelChange event.


BeforeCollapse

The BeforeCollapse event is fired before an item is collapsed (closed).

Syntax

Visual Basic

Private Sub object_BeforeCollapse(Node, bProcessed)

Visual C++

OnBeforeCollapseObject(Node, bProcessed);

Delphi

Procedure BeforeCollapse(Sender, Node, bProcessed);

The BeforeCollapse event syntax has these parts:

Part	Description
Node	A Branch object that is being collapsed.
bProcessed	A Boolean expression that specifies whether the event procedure processed the event.
Settings

The settings for bProcessed are:

Setting	Description
True	The TreeView control will ignore the collapse event.
False	(Default) The node will be collapsed.
Remarks

When a node is collapsed in the TreeView control, the TreeView control fires the BeforeCollapse event before the node is collapsed. The user may cancel the collapse event by setting the bProcessed variable to True. If the collapse event is not canceled, the TreeView control collapses the item, and then fires an AfterCollapse event.


BeforeDBAddNode

The BeforeDBAddNode event is fired before an item is about to be added to the TreeView from a data source.

Syntax

Visual Basic

Private Sub object_BeforeDBAddNode(Text, Allow)

Visual C++

OnBeforeDBAddNodeObject(Text, Allow);

Delphi

Procedure BeforeDBAddNode(Text, Allow);

The BeforeDBAddNode event syntax has these parts:

Part	Description
Text	A string which contains the text about to be added.
Allow	A boolean which determines whether the item will be added.
Settings

The settings for Allow are:

Setting	Description
True	(Default) The TreeView control will add the item.
False	The TreeView control will not add the item.
Remarks

When a TreeView control is bound to a data source, each item added from the data source has the Before and After DBAddNode event fired to allow you to customize the branch.


BeforeExpand

The BeforeExpand event is fired before an item is expanded (opened).

Syntax

Visual Basic

Private Sub object_BeforeExpand(Node, bProcessed)

Visual C++

OnBeforeExpandObject(Node, bProcessed);

Delphi

Procedure BeforeExpand(Sender, Node, bProcessed);

The BeforeExpand event syntax has these parts:

Part	Description
Node	A Branch object that is being expanded.
bProcessed	A Boolean expression that specifies whether the event procedure processed the event.
Settings

The settings for bProcessed are:

Setting	Description
True	The TreeView control will ignore the expand event.
False	(Default) The node will be expanded.
Remarks

When a node is expanded in the TreeView control, the TreeView control fires the BeforeExpand event before the node is expanded. The user may cancel the expand event by setting the bProcessed variable to True. If the expand event is not canceled, the TreeView control expands the item, and then fires an AfterExpand event.


BeforeSelChange

The BeforeSelChange event is fired before an item is selected.

Syntax

Visual Basic

Private Sub object_BeforeSelChange(Node, bProcessed)

Visual C++

OnBeforeSelChangeObject(Node, bProcessed);

Delphi

Procedure BeforeSelChange(Sender, Node, bProcessed);

The BeforeSelChange event syntax has these parts:

Part	Description
Node	A Branch object that is being selected.
bProcessed	A Boolean expression that specifies whether the event procedure processed the event.
Settings

The settings for bProcessed are:

Setting	Description
True	The TreeView control will ignore the selection change event.
False	(Default) The selection change will be performed.
Remarks

When a node is selected in the TreeView control, the TreeView control fires the BeforeSelChange event before the selection is made. The user may cancel the selection change by setting the bProcessed variable to True. If the selection change is not canceled, the TreeView control selects the item, and then fires an AfterSelChange event.


DeleteItem

The DeleteItem event is fired when an item is about to be deleted.

Syntax

Visual Basic

Private Sub object_DeleteItem(Node)

Visual C++

OnDeleteItemObject(Node);

Delphi

Procedure DeleteItem(Sender, Node);

The DeleteItem event syntax has these parts:

Part	Description
Node	A Branch object that is about to be deleted.
Remarks

You can associate data with each item in the parameter property of a Branch. When the Branch object is about to be deleted, you can free any data structures you have allocated in the DeleteItem Event.


InPlaceEditBegin

The InPlaceEditBegin event is fired before an item is about to be edited by the user.

Syntax

Visual Basic

Private Sub object_InPlaceEditBegin(Node, bAllow)

Visual C++

OnInPlaceEditBeginObject(Node, bAllow);

Delphi

Procedure InPlaceEditBegin(Sender, Node, bAllow);

The InPlaceEditBegin event syntax has these parts:

Part	Description
Node	A Branch object that is being edited.
bAllow	A Boolean expression that specifies if branch is allowed to be edited.
Settings

The settings for bAllow are:

Setting	Description
True	(Default) The TreeView control will allow the item to be edited.
False	The TreeView control will not allow the item to be edited.
Remarks

When a selected node is single clicked, the TreeView control will allow that node to be edited inline.


InPlaceEditEnd

The InPlaceEditEnd event is fired before an item is about to be edited by the user.

Syntax

Visual Basic

Private Sub object_InPlaceEditEnd(Node, Text, fAllow)

Visual C++

OnInPlaceEditEndObject(Node, Text, bAllow);

Delphi

Procedure InPlaceEditEnd(Sender, Node, Text, bAllow);

The InPlaceEditEnd event syntax has these parts:

Part	Description
Node	A Branch object that is being edited.
Text	A string which contains the new text of the item.
bAllow	A Boolean expression that specifies if branch will accept the new value.
Settings

The settings for bAllow are:

Setting	Description
True	(Default) The TreeView control will assign the new text to the item.
False	The TreeView control will not assign the new text to the item.
Remarks

When a selected node is single clicked, the TreeView control will allow that node to be edited inline.


LButtonDblClick

The LButtonDblClick event is fired when the left button of the mouse is double clicked over the TreeView control.

Syntax

Visual Basic

Private Sub object_LButtonDblClick(Node, x, y)

Visual C++

OnLButtonDblClickObject(Node, x, y);

Delphi

Procedure LButtonDblClick(Sender, Node, x, y);

The LButtonDblClick event syntax has these parts:

Part	Description
Node	A Branch object that is under the mouse. This will be an empty Branch object if no item is under the mouse.
x	A short integer with the x position of the mouse at the time of the LButtonDblClick event.
y	A short integer with the y position of the mouse at the time of the LButtonDblClick event.


LButtonDown

The LButtonDown event is fired when the left button of the mouse is pressed over the TreeView control.

Syntax

Visual Basic

Private Sub object_LButtonDown(Node, x, y)

Visual C++

OnLButtonDownObject(Node, x, y);

Delphi

Procedure LButtonDown(Sender, Node, x, y);

The LButtonDown event syntax has these parts:

Part	Description
Node	A reference to the Branch object that is under the mouse. This will be an empty Branch object if no item is under the mouse.
x	A short integer with the x position of the mouse at the time of the LButtonDown event.
y	A short integer with the y position of the mouse at the time of the LButtonDown event.


LButtonUp

The LButtonUp event is fired when the left button of the mouse is released over the TreeView control.

Syntax

Visual Basic

Private Sub object_LButtonUp(Node, x, y)

Visual C++

OnLButtonUpObject(Node, x, y);

Delphi

Procedure LButtonUp(Sender, Node, x, y);

The LButtonUp event syntax has these parts:

Part	Description
Node	A reference to the Branch object that is under the mouse. This will be an empty Branch object if no item is under the mouse.
x	A short integer with the x position of the mouse at the time of the LButtonUp event.
y	A short integer with the y position of the mouse at the time of the LButtonUp event.


RButtonDblClick

The RButtonDblClick event is fired when the right button of the mouse is double clicked over the TreeView control.

Syntax

Visual Basic

Private Sub object_RButtonDblClick(Node, x, y)

Visual C++

OnRButtonDblClickObject(Node, x, y);

Delphi

Procedure RButtonDblClick(Sender, Node, x, y);

The RButtonDblClick event syntax has these parts:

Part	Description
Node	A reference to the Branch object that is under the mouse. This will be an empty Branch object if no item is under the mouse.
x	A short integer with the x position of the mouse at the time of the RButtonDblClick event.
y	A short integer with the y position of the mouse at the time of the RButtonDblClick event.


RButtonDown

The RButtonDown event is fired when the right button of the mouse is pressed over the TreeView control.

Syntax

Visual Basic

Private Sub object_RButtonDown(Node, x, y)

Visual C++

OnRButtonDownObject(Node, x, y);

Delphi

Procedure RButtonDown(Sender, Node, x, y);

The LButtonDown event syntax has these parts:

Part	Description
Node	A reference to the Branch object that is under the mouse. This will be an empty Branch object if no item is under the mouse.
x	A short integer with the x position of the mouse at the time of the RButtonDown event.
y	A short integer with the y position of the mouse at the time of the RButtonDown event.


RButtonUp

The RButtonUp event is fired when the right button of the mouse is released over the TreeView control.

Syntax

Visual Basic

Private Sub object_RButtonUp(Node, x, y)

Visual C++

OnRButtonUpObject(Node, x, y);

Delphi

Procedure RButtonUp(Sender, Node, x, y);

The RButtonUp event syntax has these parts:

Part	Description
Node	A reference to the Branch object that is under the mouse. This will be an empty Branch object if no item is under the mouse.
x	A short integer with the x position of the mouse at the time of the RButtonUp event.
y	A short integer with the y position of the mouse at the time of the RButtonUp event.


TreeView Branch Properties

List of Properties

The ProtoView TreeView Branch object supports the following properties:

CustomItemPicture  Data	IsOpen  Level	StandardItemPicture  Text


CustomItemPicture

The CustomItemPicture property sets or returns the default picture displayed next to an item on the TreeView control.

Syntax

Visual Basic

object.CustomItemPicture  = picture

picture = object.CustomItemPicture

Visual C++

object.SetCustomItemPicture(picture);

picture = object.GetCustomItemPicture( );

Delphi

object.CustomItemPicture := picture;

picture:= object.CustomItemPicture;

The CustomItemPicture property syntax has these parts:

Part	Description
object	A Branch object.
picture	A picture object which contains a graphic to assign  as described in Settings.
Settings

The settings for picture are:

Setting	Description
(None)	(Default) No picture.
(Bitmap, icon, metafile)	Specifies a graphic.  You can load the graphic from the Properties window at design time.  At run time, you can also set this property using the LoadPicture function on a bitmap, icon, or metafile.
Remarks

At design time, you can transfer a graphic with the Clipboard using the Copy, Cut, and Paste commands on the Edit menu.  At run time, you can use Clipboard methods such as GetData, SetData, and GetFormat with the nontext Clipboard constants vbCFBitmap, vbCFMetafile, and vbCFDIB, which are listed in the Visual Basic (VB) object library in the Object Browser.

When setting the CustomItemPicture property at design time, the graphic is saved and loaded with the form.  If you create an executable file, the file contains the image.

Note   At run time, the CustomItemPicture property can be set to any other object's Picture property, or you can assign it the graphic returned by the LoadPicture function.

The TreeView control only supports bitmap images in the CustomItemPicture property.

For the image to display, the EnableBitmaps Property must be set to TRUE. The way in which a custom bitmap is interpreted depends on the value of the UseStateBitmaps Property.

When a custom bitmap is assigned to an item, the TreeView control can interpret the bitmap as a normal or state formatted bitmap. A normal bitmap is displayed in its entirety next to the item. The interpretation of custom bitmaps depends on the setting of the UseStateBitmaps Property.

The picture to be displayed depends on a number of other settings. The picture displayed next to an item depends on the following rules:

CustomItemPicture Property

This picture will be displayed next to the item. If not set to None, this setting overrides all following properties.

StandardItemPicture Property

If the CustomItemPicture property is set to None, then the StandardItemPicture property specifies the picture that will be displayed next to the item. If not set to None, this setting overrides all following properties.

CustomLevelPicture Property

If both the CustomItemPicture and StandardItemPicture are set to None, then the picture displayed next to the item will depend on this setting. If not set to None for the level on which the item resides, the CustomLevelPicture will be displayed next to the item. If not set to None, this setting overrides all following properties.

StandardLevelPicture Property

If the CustomItemPicture, StandardItemPicture, and the CustomLevelPicture for the level on which this item resides are all set to None, then the picture displayed next to the item will depend on this setting. If not set to None for the level on which the item resides, the StandardLevelPicture will be displayed next to the item. If not set to None, this setting overrides all following properties.

CustomDefaultPicture Property

If all of the above properties are set to None, then the picture displayed next to the item will depend on this setting. If not set to None, the CustomDefaultPicture will be displayed next to the item. If not set to None, this setting overrides the StandardDefaultPicture.

StandardDefaultPicture Property

This is the default picture that will be displayed next to an item. This property is always set to a picture and can never be set to None. If all the above properties are set to None, then this will be the picture that will be displayed next to the item.


Data

The Data property is a user defined value that can be kept with each item in a TreeView control. Not available at design time.

Syntax

Visual Basic

object.Data = value

value = object.Data

Visual C++

object.SetData(value);

value = object.GetData( );

Delphi

object.Data:= value;

value:= object.Data;

The Data property syntax has these parts:

Part	Description
object	A Branch object.
value	A long integer specified by the user as a value or a pointer to data. It is stored with the Branch object in the TreeView control.
Remarks

The Data property is user defined. Neither the TreeView control nor the Branch object use this value. You can use the Data property to associate a number (or a pointer to a data structure for languages that allow the storage and usage of pointers) with a TreeView control item.

Note:  You cannot set the Data property on the main Branch. The main Branches Data property is always set to zero.


IsOpen

The IsOpen property returns a boolean value indicating whether or not the Branch object is open. Read only at run time, not available at design time.

Syntax

Visual Basic

boolean = object.IsOpen

Visual C++

boolean = object.GetIsOpen( );

Delphi

boolean := object.IsOpen;

Part	Description
object	A Branch object.
boolean	A Boolean expression which returns whether the Branch object is open.
Settings

The settings for boolean are:

Setting	Description
True	The object is open.
False	The object is closed.
Remarks

Branch objects that are not visible are automatically closed.

Note:  The IsOpen property on the main Branch is meaningless. The main Branches IsOpen property is always returns True.


Level

The Level property indicates the level the Branch object is on in a TreeView control. Read only at run time, not available at design time.

Syntax

Visual Basic

object.Level = value

value = object.Level

Visual C++

object.SetLevel(value);

value = object.GetLevel( );

Delphi

object.Level:= value;

value:= object.Level;

Part	Description
object	A Branch object.
value	A short integer which returns the level the Branch item is located on.
Remarks

The Level property represents the hierarchical level on which the Branch object resides. A Branch object at the root leve (topmost level) will have its Level property set to 0. A child of a root item will have a Level property of 1, and so on.

Note:  The Level property on the main Branch is meaningless. The main Branches Level property is always set to zero.


StandardItemPicture

Returns or sets a value indicating the default picture that will be displayed next to a specific item in the TreeView control.

Syntax

Visual Basic

object. StandardItemPicture  = value

value = object. StandardItemPicture

Visual C++

object.SetStandardItemPicture(value);

value = object.GetStandardItemPicture( );

Delphi

object. StandardItemPicture := value;

value:= object. StandardItemPicture;

The StandardItemPicture property syntax has these parts:

Part	Description
object	A Branch object.
value	A constant that determines the default picture that will be displayed next to an item in the TreeView control, as described in Settings.
Settings

The settings for value are:

Setting	Description
pvtNone	No picture.
pvtpicFolders	(Default) Folder Picture.
pvtpicBoxes1	Boxes #1 Picture.
pvtpicDocument	Document Picture.
pvtpicHardDisk	Hard Disk Picture.
pvtpicProgram	Program File Picture.
pvtpicSystemFile	System File Picture.
pvtpicBoxes2	Boxes #2 Picture.
pvtpicBoxes3	Boxes #3 Picture.
pvtpicASCIIFile	ASCII File Picture.
pvtpicHelpFile	Help File Picture.
Remarks

The EnableBitmaps Property allows the TreeView control to display an image next to each item at run time.

When a custom bitmap is assigned to an item, the TreeView control can interpret the bitmap as a normal or state formatted bitmap. A normal bitmap is displayed in its entirety next to the item. The interpretation of custom bitmaps depends on the setting of the UseStateBitmaps Property.

The picture to be displayed depends on a number of other settings. The picture displayed next to an item depends on the following rules:

CustomItemPicture Property

This picture will be displayed next to the item. If not set to None, this setting overrides all following properties.

StandardItemPicture Property

If the CustomItemPicture property is set to None, then the StandardItemPicture property specifies the picture that will be displayed next to the item. If not set to None, this setting overrides all following properties.

CustomLevelPicture Property

If both the CustomItemPicture and StandardItemPicture are set to None, then the picture displayed next to the item will depend on this setting. If not set to None for the level on which the item resides, the CustomLevelPicture will be displayed next to the item. If not set to None, this setting overrides all following properties.

StandardLevelPicture Property

If the CustomItemPicture, StandardItemPicture, and the CustomLevelPicture for the level on which this item resides are all set to None, then the picture displayed next to the item will depend on this setting. If not set to None for the level on which the item resides, the StandardLevelPicture will be displayed next to the item. If not set to None, this setting overrides all following properties.

CustomDefaultPicture Property

If all of the above properties are set to None, then the picture displayed next to the item will depend on this setting. If not set to None, the CustomDefaultPicture will be displayed next to the item. If not set to None, this setting overrides the StandardDefaultPicture.

StandardDefaultPicture Property

This is the default picture that will be displayed next to an item. This property is always set to a picture and can never be set to None. If all the above properties are set to None, then this will be the picture that will be displayed next to the item.


Text

The Text property represents the text string associated with the Branch object. Not available at design time.

Syntax

Visual Basic

object.Text = string

string = object.Text

Visual C++

object.SetText(string);

string = object.GetText( );

Delphi

object.Text:= string;

string:= object.Text;

The Text property syntax has these parts:

Part	Description
object	A Branch object.
string	A string specifying the text that is to be associated with the Branch object.
Remarks

The value of the Text property is initially set in the Add Method. Although you can change the value of the Text property at run time, the placement of the Branch object does not change in the hierarchy even when the Sort Property is set to True. That is to say, the item is not re-sorted in the list.

Note:  The Text property on the main Branch is meaningless. The main Branches Text property is always set to a zero length (empty) string.


TreeView Branch Methods

List of Methods

The ProtoView TreeView Branch object supports the following properties:

Add  Clear  Close Get  GetHandle	IsLocked  IsMainBranch IsValid Lock Open	Remove Select Unlock


Add

Adds a new item to the Branch.

Syntax

Visual Basic

object.Add relation, relative, text

Visual C++

object.Add (relation, relative, text);

Delphi

object.Add (relation, relative, text);

The Add method syntax has these parts:

Part	Description
object	A Branch object.
relationship	A constant that specifies how the new item will be inserted into the list.
relative	A numeric expression constant that specifies the relative item. This argument is a zero based index of the child items of the Branch object. The first child of a Branch is at index 0, the second at index 1, and so on.
text	A string expression that specifies the text of the new item.
Settings

The settings for relationship are:

Setting	Description
pvtPositionInOrder	If the Sort Property is set to True, PositionInOrder causes the new item to be inserted in sorted order in the list. If the Sort Property is set to False, the new item will be inserted at the end of the list. The relative argument is ignored if PositionInOrder is used.
pvtPositionBefore	Causes the new item to appear before the item specified in relative.
pvtPositionAfter	Causes the new item to appear after the item specified in relative.
Remarks

To remove an item from a Branch, use the remove method.

Visual Basic Example

This example adds a number of items to a TreeView control. To try this example, create a form and place a TreeView control on the form. Set the Name property of the control to PTreeView1. Create a menu for the form that contains the command Add (mnuAdd). Paste the Sub procedure into the Declarations section of the form, and press F5.

Private Sub mnuAdd_Click()
Dim root As Branch
Dim ParentNode As Branch
Dim ChildNode As Branch

Set root = PTreeView1.Branches

Set ParentNode = root.Add(pvtPositionInOrder, 0, "Parent Node 1")
Set ChildNode = ParentNode.Add(pvtPositionInOrder, 0, "Child Node 1")
Set ChildNode = ParentNode.Add(pvtPositionInOrder, 0, "Child Node 2")
Set ChildNode = ParentNode.Add(pvtPositionInOrder, 0, "Child Node 3")
Set ChildNode = ParentNode.Add(pvtPositionInOrder, 0, "Child Node 4")
Set ChildNode = ParentNode.Add(pvtPositionInOrder, 0, "Child Node 5")

Set ParentNode = root.Add(pvtPositionInOrder, 0, "Parent Node 2")
Set ChildNode = ParentNode.Add(pvtPositionAfter, 0, "Child Node 1")
Set ChildNode = ParentNode.Add(pvtPositionAfter, 0, "Child Node 2")
Set ChildNode = ParentNode.Add(pvtPositionAfter, 0, "Child Node 3")
Set ChildNode = ParentNode.Add(pvtPositionAfter, 0, "Child Node 4")
Set ChildNode = ParentNode.Add(pvtPositionAfter, 0, "Child Node 5")

Set ParentNode = root.Add(pvtPositionInOrder, 0, "Parent Node 3")
Set ChildNode = ParentNode.Add(pvtPositionBefore, 0, "Child Node 1")
Set ChildNode = ParentNode.Add(pvtPositionBefore, 0, "Child Node 2")
Set ChildNode = ParentNode.Add(pvtPositionBefore, 0, "Child Node 3")
Set ChildNode = ParentNode.Add(pvtPositionBefore, 0, "Child Node 4")
Set ChildNode = ParentNode.Add(pvtPositionBefore, 0, "Child Node 5")
End Sub

Visual C++ Example

This example adds a number of items to a TreeView control. To try this example, create a dialog and place a TreeView control on the dialog. Set the variable of the control to m_treeview. Include the Branch object in your project.

BOOL CMyDialog::OnInitDialog()
{
CDialog::OnInitDialog();

CBranch root(m_treeview.GetBranches());

AddParent(root, "Parent 1");
AddParent(root, "Parent 2");
AddParent(root, "Parent 3");
AddParent(root, "Parent 4");
AddParent(root, "Parent 5");

return TRUE;
}

void CMyDialog::AddParent(CBranch& root, LPCTSTR szText)
{
CBranch aParent(root.Add(CBranch::pvtPositionInOrder, 0, szText));

AddChild(aParent, "Child 1");
AddChild(aParent, "Child 2");
AddChild(aParent, "Child 3");
AddChild(aParent, "Child 4");
AddChild(aParent, "Child 5");
}

void CMyDialog::AddChild(CBranch& aParent, LPCTSTR szText)
{
CBranch aChild(aParent.Add(CBranch::pvtPositionInOrder, 0, szText));

aChild.Add(CBranch::pvtPositionInOrder, 0, "GrandChild 1");
aChild.Add(CBranch::pvtPositionInOrder, 0, "GrandChild 2");
aChild.Add(CBranch::pvtPositionInOrder, 0, "GrandChild 3");
aChild.Add(CBranch::pvtPositionInOrder, 0, "GrandChild 4");
aChild.Add(CBranch::pvtPositionInOrder, 0, "GrandChild 5");
}


Clear

Removes all the child items from a Branch.

Syntax

Visual Basic

object.Clear

Visual C++

object.Clear ( );

Delphi

object.Clear;

The Clear method syntax has these parts:

Part	Description
object	A Branch object.
Remarks

If the object is the main Branch, then the TreeView control will be cleared of all items. Otherwise, only the children of the specified Branch will be cleared.

Visual Basic Example

This example clears a TreeView control. To try this example, create a form and place a TreeView control on the form. Set the Name property of the control to PTreeView1. Create a menu for the form that contains the command Add (mnuAdd) and another that contains the command Clear(mnuClear). Paste the Sub procedure into the Declarations section of the form, and press F5.

Private Sub mnuAdd_Click ()
Dim root As Branch
Dim ParentNode As Branch
Dim ChildNode As Branch

Set root = PTreeView1.Branches
root.Clear

Set ParentNode = root.Add(pvtPositionInOrder, 0, "Parent Node 1")
Set ChildNode = ParentNode.Add(pvtPositionInOrder, 0, "Child Node 1")
Set ChildNode = ParentNode.Add(pvtPositionInOrder, 0, "Child Node 2")
Set ChildNode = ParentNode.Add(pvtPositionInOrder, 0, "Child Node 3")
Set ChildNode = ParentNode.Add(pvtPositionInOrder, 0, "Child Node 4")
Set ChildNode = ParentNode.Add(pvtPositionInOrder, 0, "Child Node 5")

Set ParentNode = root.Add(pvtPositionInOrder, 0, "Parent Node 2")
Set ChildNode = ParentNode.Add(pvtPositionAfter, 0, "Child Node 1")
Set ChildNode = ParentNode.Add(pvtPositionAfter, 0, "Child Node 2")
Set ChildNode = ParentNode.Add(pvtPositionAfter, 0, "Child Node 3")
Set ChildNode = ParentNode.Add(pvtPositionAfter, 0, "Child Node 4")
Set ChildNode = ParentNode.Add(pvtPositionAfter, 0, "Child Node 5")

Set ParentNode = root.Add(pvtPositionInOrder, 0, "Parent Node 3")
Set ChildNode = ParentNode.Add(pvtPositionBefore, 0, "Child Node 1")
Set ChildNode = ParentNode.Add(pvtPositionBefore, 0, "Child Node 2")
Set ChildNode = ParentNode.Add(pvtPositionBefore, 0, "Child Node 3")
Set ChildNode = ParentNode.Add(pvtPositionBefore, 0, "Child Node 4")
Set ChildNode = ParentNode.Add(pvtPositionBefore, 0, "Child Node 5")
End Sub

Private Sub mnuClear_Click ()
Dim root As Branch

Set root = PTreeView1.Branches
root.Clear
End Sub

Visual C++ Example

This example clears a TreeView control. To try this example, create a dialog and place a TreeView control on the dialog. Set the variable of the control to m_treeview. Include the Branch object in your project. Add a button on the dialog that invokes the OnClear method when pressed.

BOOL CMyDialog::OnInitDialog()
{
CDialog::OnInitDialog();

CBranch root(m_treeview.GetBranches());

root.Clear();

AddParent(root, "Parent 1");
AddParent(root, "Parent 2");
AddParent(root, "Parent 3");
AddParent(root, "Parent 4");
AddParent(root, "Parent 5");

return TRUE;
}

void CMyDialog::AddParent(CBranch& root, LPCTSTR szText)
{
CBranch aParent(root.Add(CBranch::pvtPositionInOrder, 0, szText));

AddChild(aParent, "Child 1");
AddChild(aParent, "Child 2");
AddChild(aParent, "Child 3");
AddChild(aParent, "Child 4");
AddChild(aParent, "Child 5");
}

void CMyDialog::AddChild(CBranch& aParent, LPCTSTR szText)
{
CBranch aChild(aParent.Add(CBranch::pvtPositionInOrder, 0, szText));

aChild.Add(CBranch::pvtPositionInOrder, 0, "GrandChild 1");
aChild.Add(CBranch::pvtPositionInOrder, 0, "GrandChild 2");
aChild.Add(CBranch::pvtPositionInOrder, 0, "GrandChild 3");
aChild.Add(CBranch::pvtPositionInOrder, 0, "GrandChild 4");
aChild.Add(CBranch::pvtPositionInOrder, 0, "GrandChild 5");
}

void CMyDialog::OnClear()
{
CBranch root(m_treeview.GetBranches());

root.Clear();
}


Close

Closes the Branch object according to command argument.

Syntax

Visual Basic

object.Close command

Visual C++

object.Close ( command );

Delphi

object.Close ( command );

The Close method syntax has these parts:

Part	Description
object	A Branch object.
command	A value or constant that specifies how the Close method will operate on the Branch object.
Settings

The settings for command are:

Setting	Description
Node	Causes the Branch object to close if it is not already closed.
Children	Causes all the children of the Branch object to close.
Remarks

When a Branch is locked, it retains its display state (either open or closed).

Visual Basic Example

This example closes the first Branch object from the list of items in a TreeView control. To try this example, create a form and place a TreeView control on the form. Set the Name property of the control to PTreeView1. Create a menu for the form that contains the command Close (mnuClose). Paste the Sub procedure into the Declarations section of the form, and press F5.

Private Sub mnuClose_Click()
Dim root As Branch
Dim node As Branch

Set root = PTreeView1.Branches
Set node = root.Get(pvtGetChild, 0)

node.Close(Node)
End Sub

Visual C++ Example

This example closes the first Branch object from the list of items in a TreeView control. To try this example, create a dialog and place a TreeView control on the dialog. Set the variable of the control to m_treeview. . Include the Branch object in your project. Create a button that invokes the OnClose method when pressed.

void MyDialog::OnClose()
{
CBranch root(m_treeview.GetBranches());
CBranch node(root.Get(pvtGetChild, 0));

node.Close(CBranch::Node)
}


Get

Returns a Branch object from a related Branch object.

Syntax

Visual Basic

object.Get relationship, relative

Visual C++

object.Get ( relationship, relative );

Delphi

object.Get ( relationship, relative );

The Get method syntax has these parts:

Part	Description
object	A Branch object.
relationship	A constant that specifies which new item will be obtained from the list.
relative	A short integer that specifies the relative item. This argument is a zero based index of the child items of the Branch object. The first child of a Branch is at index 0, the second at index 1, and so on.
Settings

The settings for relationship are:

pvtGetNextSibling

Returns the next Branch object that is at the same hierarchical level in the TreeView control as this Branch. If no subsequent Branch object exists at this level, the method returns an empty Branch object.

The relative argument is ignored if GetNextSibling is used.

pvtGetPrevSibling

Returns the previous Branch object that is at the same hierarchical level in the TreeView control as this Branch. If no previous Branch object exists at this level, the method returns an empty Branch object.

The relative argument is ignored if GetPrevSibling is used.

pvtGetNextVisible

Returns the next Branch object that is visible on the TreeView control after this object. If no subsequent Branch object exists, the method returns an empty Branch object.

The relative argument is ignored if GetNextVisible is used.

pvtGetPrevVisible

Returns the previous Branch object that is visible on the TreeView control before this object. If no previous Branch object exists, the method returns an empty Branch object.

The relative argument is ignored if GetPrevVisible is used.

pvtGetNextSelected

Returns the next Branch object that is selected on the TreeView control after this object. If no subsequent selected Branch object exists, the method returns an empty Branch object.

The relative argument is ignored if GetNextSelected is used.

pvtGetPrevSelected

Returns the previous Branch object that is selected on the TreeView control before this object. If no previous selected Branch object exists, the method returns an empty Branch object.

The relative argument is ignored if GetPrevSelected is used.

pvtGetParent

Returns the parent Branch of this object. If the Branch object does not have a parent, the method returns an empty Branch object.

The relative argument is ignored if GetParent is used.

pvtGetNext

Returns the next Branch object in the TreeView control after this object. If no subsequent Branch object exists, the method returns an empty Branch object.

The relative argument is ignored if GetNext is used.

pvtGetPrevious

Returns the previous Branch object in the TreeView control before this object. If no previous Branch object exists, the method returns an empty Branch object.

The relative argument is ignored if GetPrevious is used.

pvtGetChild

Returns a child Branch object of this object. If no child Branch object exists, the method returns an empty Branch object. The child object obtained depends on the value of the relative argument.

Remarks

To add an item to a Branch, use the Add Method. To remove an item from a Branch, use the Remove Method.

For a single selection TreeView control, both the GetNextSelected and GetPrevSelected arguments will return the selected Branch if a Branch is selected. If no Branch is selected, the Get method will return an an empty Branch object.

Visual Basic Example

This example walks through the list of items in a TreeView control. It starts with the first node and continues which each successive node until an empty Branch object is returned. To try this example, create a form and place a TreeView control on the form. Set the Name property of the control to PTreeView1. Create a menu for the form that contains the command Walk (mnuWalk). Paste the Sub procedure into the Declarations section of the form, and press F5.

Private Sub mnuWalk_Click()
Dim root As Branch
Dim node As Branch

Set root = PTreeView1.Branches
Set node = root.Get(pvtGetChild, 0)

Do While node.IsValid
    Set node = node.Get(pvtGetNext, 0)
Loop
End Sub

Visual C++ Example

This example walks through the list of items in a TreeView control. It starts with the first node and continues which each successive node until an empty Branch object is returned. To try this example, create a dialog and place a TreeView control on the dialog. Set the variable of the control to m_treeview. . Include the Branch object in your project. Create a button that invokes the OnWalk method when pressed.

void MyDialog::OnWalk()
{
CBranch	root(m_treeview.GetBranches());
CBranch*	node

node = &root.Get(pvtGetChild, 0);

while ( node->IsValid() )
{
node = &node->Get(pvtGetNext, 0);
}
}


GetHandle

The GetHandle method returns the item handle (HITEM) of the TreeView control item associated with the Branch.

Syntax

Visual Basic

handle = object.GetHandle

Visual C++

handle = object.GetHandle ();

Delphi

handle := object.GetHandle;

The GetHandle method syntax has these parts:

Part	Description
object	A Branch object.
handle	A handle which gives you direct access to the branch item.
Remarks

The HITEM handle can be used with the hWnd Property to send messages directly to the TreeView control.


IsLocked

Returns a boolean value indicating whether or not the Branch object is locked.

Syntax

Visual Basic

boolean = object.IsLocked

Visual C++

boolean = object.IsLocked ();

Delphi

boolean:= object.IsLocked;

The IsLocked method syntax has these parts:

Part	Description
object	A Branch object.
boolean	A boolean expression which returns if a branch item is locked.
Settings

The settings for boolean are:

Setting	Description
True	The Branch object is locked.
False	The Branch object is not locked.
Remarks

When a Branch is locked, it retains its display state (either open or closed). Clicking on the +/- buttons or double clicking has no effect on a locked item.

Visual Basic Example

This example toggles the lock state of the first Branch object from the list of items in a TreeView control. To try this example, create a form and place a TreeView control on the form. Set the Name property of the control to PTreeView1. Create a menu for the form that contains the command ToggleLock (mnuToggleLock). Paste the Sub procedure into the Declarations section of the form, and press F5.

Private Sub mnuToggleLock_Click ()
Dim root As Branch
Dim node As Branch

Set root = PTreeView1.Branches
Set node = root.Get(pvtGetChild, 0)

If node.IsLocked Then
node.Unlock
Else
node.Lock
Endif

End Sub

Visual C++ Example

This example toggles the lock state of the first Branch object from the list of items in a TreeView control. To try this example, create a dialog and place a TreeView control on the dialog. Set the Name property of the control to m_treeview. . Include the Branch object in your project. Create a button that invokes the OnToggleLock method when pressed.

void MyDialog::OnToggleLock()
{
CBranch	root(m_treeview.GetBranch());
CBranch	node(root.Get(CBranch::GetChild, 0));

if ( node.IsLocked() )
node.Unlock();
else
node.Lock();
}


IsMainBranch

Returns boolean value indicating whether or not the Branch object is the main Branch object.

Syntax

Visual Basic

boolean = object.IsMainBranch

Visual C++

boolean = object.IsMainBranch ();

Delphi

boolean:= object.IsMainBranch;

The IsMainBranch method syntax has these parts:

Part	Description
object	A Branch object.
boolean	A boolean expression which returns if a branch item is the main branch.
Settings

The settings for boolean are:

Setting	Description
True	The object is the main Branch.
False	The object is not the main Branch.
Remarks

To add an item to a Branch, use the Add Method. To remove an item from a Branch, use the remove method.


IsValid

Returns boolean value indicating whether or not the Branch object is a valid Branch object.

Syntax

Visual Basic

boolean = object.IsValid

Visual C++

boolean = object.IsValid ();

Delphi

boolean:= object.IsValid;

The IsValid method syntax has these parts:

Part	Description
object	A Branch object.
boolean	A boolean expression which returns if a branch item is valid.
Settings

The settings for boolean are:

Setting	Description
True	The object is a valid Branch.
False	The object is not a valid Branch.
Remarks

Some Branch object methods will return an invalid, or empty Branch object, signifiying the end of a list or a search failure.

Visual Basic Example

This example walks through the list of items in a TreeView control. It starts with the first node and continues which each successive node until an empty Branch object is returned. To try this example, create a form and place a TreeView control on the form. Set the Name property of the control to PTreeView1. Create a menu for the form that contains the command Walk (mnuWalk). Paste the Sub procedure into the Declarations section of the form, and press F5.

Private Sub mnuWalk_Click()
Dim root As Branch
Dim node As Branch

Set root = PTreeView1.Branches
Set node = root.Get(pvtGetChild, 0)

Do While node.IsValid
    Set node = node.Get(pvtGetNext, 0)
Loop
End Sub

Visual C++ Example

This example walks through the list of items in a TreeView control. It starts with the first node and continues which each successive node until an empty Branch object is returned. To try this example, create a dialog and place a TreeView control on the dialog. Set the variable of the control to m_treeview. . Include the Branch object in your project. Create a button that invokes the OnWalk method when pressed.

void MyDialog::OnWalk()
{
CBranch	root(m_treeview.GetBranches());
CBranch*	node;

node = &root.Get(pvtGetChild, 0);

while ( node->IsValid() )
{
node = &node->Get(pvtGetNext, 0);
}
}


Lock

Locks a Branch in a TreeView Control.

Syntax

Visual Basic

object.Lock

Visual C++

object.Lock ();

Delphi

object.Lock;

The Lock method syntax has these parts:

Part	Description
object	A Branch object.
Remarks

When a Branch is locked, it retains its display state (either open or closed). Clicking on the +/- buttons or double clicking has no effect on a locked item.

Visual Basic Example

This example toggles the lock state of the first Branch object from the list of items in a TreeView control. To try this example, create a form and place a TreeView control on the form. Set the Name property of the control to PTreeView1. Create a menu for the form that contains the command ToggleLock (mnuToggleLock). Paste the Sub procedure into the Declarations section of the form, and press F5.

Private Sub mnuToggleLock_Click ()
Dim root As Branch
Dim node As Branch

Set root = PTreeView1.Branches
Set node = root.Get(pvtGetChild, 0)

If node.IsLocked Then
node.Unlock
Else
node.Lock
Endif

End Sub

Visual C++ Example

This example toggles the lock state of the first Branch object from the list of items in a TreeView control. To try this example, create a dialog and place a TreeView control on the dialog. Set the variable of the control to m_treeview. . Include the Branch object in your project. Create a button that invokes the OnToggleLock method when pressed.

void MyDialog::OnToggleLock()
{
CBranch	root(m_treeview.GetBranches());
CBranch	node(root.Get(pvtGetChild, 0));

if ( node.IsLocked() )
node.Unlock();
else
node.Lock();
}


Open

Opens the Branch object according to command argument.

Syntax

Visual Basic

object.Open command

Visual C++

object.Open (command);

Delphi

object.Open (command);

The Open method syntax has these parts:

Part	Description
object	A Branch object.
command	A constant that specifies how the Open method will operate on the Branch object.
Settings

The settings for command are:

Setting	Description
pvtEnsureVisible	Ensures that the Branch object is visible by opening all parent Branches as neccessary. Does not open the Branch object itself.
pvtNode	Same as EnsureVisible. In addition, causes the Branch object to open if it has child Branches and is currently closed.
pvtChildren	Same as Node. In addition, causes all immediate children of the Branch object to open.
pvtAllChildren	Same as Children. In addition, causes all children of the Branch object to open (including grandchildren, great grandchildren, etc).
Remarks

When a Branch is locked, it retains its display state (either open or closed).

Visual Basic Example

This example opens the first Branch object from the list of items in a TreeView control. To try this example, create a form and place a TreeView control on the form. Set the Name property of the control to PTreeView1. Create a menu for the form that contains the command Open (mnuOpen). Paste the Sub procedure into the Declarations section of the form, and press F5.

Private Sub mnuOpen_Click ()
Dim root As Branch
Dim node As Branch

Set root = PTreeView1.Branches
Set node = root.Get(pvtGetChild, 0)

node.Open(Node)
End Sub

Visual C++ Example

This example opens the first Branch object from the list of items in a TreeView control. To try this example, create a dialog and place a TreeView control on the dialog. Set the variable of the control to m_treeview. . Include the Branch object in your project. Create a button that invokes the OnOpen method when pressed.

void MyDialog::OnOpen()
{
CBranch root(m_treeview.GetBranches());
CBranch node(root.Get(pvtGetChild, 0));

node.Open(CBranch::Node);
}


Remove

Removes and deletes a Branch from a TreeView Control.

Syntax

Visual Basic

object.Remove

Visual C++

object.Remove ();

Delphi

object.Remove;

The Remove method syntax has these parts:

Part	Description
object	A Branch object.
Remarks

To add an item to a Branch, use the Add Method. To remove all child items from a Branch, use the Clear Method.

Visual Basic Example

This example removes the first Branch object from the list of items in a TreeView control. To try this example, create a form and place a TreeView control on the form. Set the Name property of the control to PTreeView1. Create a menu for the form that contains the command Remove (mnuRemove). Paste the Sub procedure into the Declarations section of the form, and press F5.

Private Sub mnuRemove_Click ()
Dim root As Branch
Dim node As Branch

Set root = PTreeView1.Branches
Set node = root.Get(pvtGetChild, 0)
node.Remove

End Sub

Visual C++ Example

This example removes the first Branch object from the list of items in a TreeView control. To try this example, create a dialog and place a TreeView control on the dialog. Set the variable of the control to m_treeview. . Include the Branch object ) in your project. Create a button that invokes the OnRemove method when pressed.

void MyDialog::OnRemove()
{
CBranch root(m_treeview.GetBranches());
CBranch node(root.Get(pvtGetChild, 0));

node.Remove();
}


Select

Selects or deselects the Branch object according to command argument.

Syntax

Visual Basic

object.Select command

Visual C++

object.Select (command);

Delphi

object.Select (command);

The Select method syntax has these parts:

Part	Description
object	A Branch object.
command	A constant that specifies how the Selectt method will operate on the Branch object.
Settings

The settings for command are:

Setting	Description
pvtNode	Causes the Branch object to be selected.
pvtUnselect	Causes the Branch object to become unselected. Not available for single selection controls.
pvtAnchor	Causes the Branch object, and all other Branch objects between this Branch and the Caret Branch, to become selected. Same as Node for single selection controls.
pvtCaret	Causes the Branch object, and all other Branch objects between this Branch and the Anchor Branch, to become selected. Same as Node for single selection controls.
Remarks

In order to be selected, a Branch object must be visible. Therefore, all selection arguments will cause the Branch object to open before the selection is made.

Visual Basic Example

This example selects the first Branch object from the list of items in a TreeView control. To try this example, create a form and place a TreeView control on the form. Set the Name property of the control to PTreeView1. Create a menu for the form that contains the command Select (mnuSelect). Paste the Sub procedure into the Declarations section of the form, and press F5.

Private Sub mnuSelect_Click ()
Dim root As Branch
Dim node As Branch

Set root = PTreeView1.Branches
Set node = root.Get(pvtGetChild, 0)

node.Select(Node)
End Sub

Visual C++ Example

This example selects the first Branch object from the list of items in a TreeView control. To try this example, create a dialog and place a TreeView control on the dialog. Set the variable of the control to m_treeview. . Include the Branch object in your project. Create a button that invokes the OnSelect method when pressed.

void MyDialog::OnSelect()
{
CBranch root(m_treeview.GetBranches());
CBranch node(root.Get(pvtGetChild, 0));

node.Select(CBranch::Node)l
}


Unlock

Unlocks a Branch in a TreeView Control.

Syntax

Visual Basic

object.Unlock

Visual C++

object.Unlock ();

Delphi

object.Unlock;

The Unlock method syntax has these parts:

Part	Description
object	A Branch object.
Remarks

When a Branch is locked, it retains its display state (either open or closed). Clicking on the +/- buttons or double clicking has no effect on a locked item.

Visual Basic Example

This example toggles the lock state of the first Branch object from the list of items in a TreeView control. To try this example, create a form and place a TreeView control on the form. Set the Name property of the control to PTreeView1. Create a menu for the form that contains the command ToggleLock (mnuToggleLock). Paste the Sub procedure into the Declarations section of the form, and press F5.

Private Sub mnuToggleLock_Click ()
Dim root As Branch
Dim node As Branch

Set root = PTreeView1.Branches
Set node = root.Get(pvtGetChild, 0)

If node.IsLocked Then
node.Unlock
Else
node.Lock
Endif

End Sub

Visual C++ Example

This example toggles the lock state of the first Branch object from the list of items in a TreeView control. To try this example, create a dialog and place a TreeView control on the dialog. Set the variable of the control to m_treeview. . Include the Branch object in your project. Create a button that invokes the OnToggleLock method when pressed.

void MyDialog::OnToggleLock()
{
CBranch	root(m_treeview.GetBranches());
CBranch	node(root.Get(pvtGetChild, 0));

if ( node.IsLocked() )
node.Unlock();
else
node.Lock();
}


Appearance

Returns or sets the paint style of a WinX Control object. Read only at run time.

Syntax

Visual Basic

object.Appearance = value

value = object.Appearance

Visual C++

object.SetAppearance(value);

value = object.GetAppearance( );

Delphi

object.Appearance := value;

value := object.Appearance;

The Appearance property syntax has these parts:

Part	Description
Object	An object expression that evaluates to a WinX control.
Value	A numeric expression that evaluates to an appearance style for a WinX control.
Settings

The settings for value are:

Setting	Description
0	Flat.  Paints controls and forms with without visual effects.
1	(Default) 3D.  Paints controls with three-dimensional effects.
Remarks

If set to 1 at design time, the Appearance property draws the control with three-dimensional effects. Setting the Appearance property to 1 also disables the BorderStyle property.


BackColor

BackColor returns or sets the background color of a WinX Control object.

Syntax

Visual Basic

object.BackColor = color

color = object.BackColor

Visual C++

object.SetBackColor(color);

color = object.GetBackColor( );

Delphi

object.BackColor:= color;

color:= object.BackColor;

The BackColor property syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
color	A value or constant that determines the background color of an object.
Remarks

See the section Notes About Colors.


BorderStyle

Returns or sets the border style for a WinX Control object, read only at run time.

Syntax

Visual Basic

object.BorderStyle = value

value = object.BorderStyle

Visual C++

object.SetBorderStyle(value);

value = object.GetBorderStyle( );

Delphi

object.BorderStyle:= value;

value:= object.BorderStyle;

The BorderStyle property syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
value	A numeric expression that evaluates to a border style for a WinX control.
Settings

The settings for value are:

Setting	Description
0	(Default) None.
1	Fixed Single.
Remarks

The BorderStyle property is not active unless the Appearance property is set to 0.


Enabled

Returns or sets a value that determines whether a WinX Control object can respond to user-generated events.

Syntax

Visual Basic

object.Enabled = boolean

boolean = object.Enabled

Visual C++

object.SetEnabled(boolean);

boolean = object.GetEnabled( );

Delphi

object.Enabled:= boolean;

boolean:= object.Enabled;

The Enabled property syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
boolean	A Boolean expression that specifies whether object can respond to user-generated events.
Settings

The settings for boolean are:

Setting	Description
True	(Default) Allows object to respond to events.
False	Prevents object from responding to events.
Remarks

The Enabled property allows forms and controls to be enabled or disabled at run time.  For example, you can disable objects that don't apply to the current state of the application.  You can also disable a control used purely for display purposes, such as a text box that provides read-only information.


Font

Returns a Font object.

Syntax

Visual Basic

object.Font = font

font = object.Font

Visual C++

object.SetFont(font);

font = object.GetFont( );

Delphi

object.Font:= font;

font:= object.Font;

The Font property syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
font	A font object which describes the controls font characteristics.
Remarks

Use the Font property of an object to identify a specific Font object whose properties you want to use. For example, the following code changes the Bold property setting of a Font object identified by the Font property of a TextBox object:

Visual Basic Example

txtFirstName.Font.Bold = True

Visual C++ Example

pIOleFont->SetBold(TRUE);
txtFirstName.SetFont(pIOleFont);


ForeColor

ForeColor returns or sets the foreground color used to display text and graphics in to a WinX Control object.

Syntax

Visual Basic

object.ForeColor = color

color = object.ForeColor

Visual C++

object.SetForeColor(color);

color = object.GetForeColor( );

Delphi

object.ForeColor:= color;

color:= object.ForeColor;

The ForeColor property syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
color	A value or constant that determines the foreground color of an object.
Remarks

See the section Notes About Colors.


hWnd

Returns a handle to a WinX Control object. Read-only at run time, not available at design time.

Syntax

Visual Basic

hWnd = object.hWnd

Visual C++

hWnd = object.GethWnd( );

Delphi

hWnd:= object.hWnd;

The hWnd property syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
hWnd	A handle which contains the windows handle of the object.
Remarks

The Microsoft Windows operating environment identifies each form and control in an application by assigning it a handle, or hWnd. The hWnd property is used with Windows API calls. Many Windows operating environment functions require the hWnd of the active window as an argument.

Note  Because the value of this property can change while a program is running, never store the hWnd value in a variable.


Notes about Colors

Visual Basic uses the Microsoft Windows operating environment red-green-blue (RGB) color scheme.  The settings for color are:

Setting	Description
Normal RGB colors	Colors specified by using the Color palette or by using the RGB or QBColor functions in code.
System default colors	Colors specified by system color constants listed in the Visual Basic (VB) object library in the Object Browser.  The Windows operating environment substitutes the user's choices as specified in the Control Panel settings.
For all forms and controls, the default settings at design time are:

BackColor set to the system default color specified by the constant vbWindowBackground.

ForeColor set to the system default color specified by the constant vbWindowText.

The valid range for a normal RGB color is 0 to 16,777,215 (&HFFFFFF).  The high byte of a number in this range equals 0; the lower 3 bytes, from least to most significant byte, determine the amount of red, green, and blue, respectively.  The red, green, and blue components are each represented by a number between 0 and 255 (&HFF).  If the high byte isn't 0, Visual Basic uses the system colors, as defined in the user's the Control Panel settings and by constants listed in the Visual Basic (VB) object library in the Object Browser.

To display text in the Windows operating environment, both the text color must be solid.  If the text color you've selected isnt displayed, the selected colors may be dithered, that is, comprised of up to three different-colored pixels.  If you choose a dithered color for the text, the nearest solid color will be substituted.


AboutBox

Use the AboutBox command to find the version number and other pertinent information about WinX.

Visual Basic

object.AboutBox

Visual C++

object. AboutBox();

Delphi

object. AboutBox;

The AboutBox method syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.


Click

Occurs when the user presses and then releases a mouse button a WinX Control object.  It can also occur when the value of a WinX Control object is changed.

Syntax

Visual Basic

Private Sub Object_Click([index As Integer])

Visual C++

void OnClickObject();

Delphi

Procedure Click(Sender : TObject)

The Click event syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
index	An integer that uniquely identifies a control if it's in a control array.
Remarks

For a control, this event occurs when the user:

•	Clicks a control with the left or right mouse button.  With a 3D check box, 3D command button, or 3D option button control, the Click event occurs only when the user clicks the left mouse button.

•	Presses the SPACEBAR when a 3D command button, 3D option button, or 3D check box control has the focus.

•	Presses ENTER when a form has a 3D command button control with its Default property set to True.

•	Presses ESC when a form has a Cancel buttonfor example, a 3D command button control with its Cancel property set to True.

•	Presses an access key for a control.  For example, if the caption of a 3D command button control is "&Go", pressing ALT+G triggers the event.

Typically, you attach a Click event procedure to a 3D command button control to carry out commands and command-like actions.  For the other applicable controls, use this event to trigger actions in response to a change in the control.

Note   To distinguish between the left, right, and middle mouse buttons, use the MouseDown and MouseUp events.


DblClick

Occurs when the user presses and releases a mouse twice quickly over a WinX Control object.

Syntax

Visual Basic

Private Sub Object_DblClick([index As Integer])

Visual C++

void OnDblClickObject();

Delphi

Procedure DblClick(Sender : TObject)

The DblClick event syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
index	An integer that uniquely identifies a control if it's in a control array.
Remarks

The argument Index uniquely identifies a control if it's in a control array.  You can use a DblClick event procedure for an implied action, such as double-clicking an icon to open a window or document.  You can also use this type of procedure to carry out multiple steps with a single action, such as double-clicking to select an item in a list box and to close the dialog box.

For those objects that receive Mouse events, the events occur in this order: MouseDown, Click, MouseUp, and DblClick.

If DblClick doesn't occur within the system's double-click time limit, the object recognizes another Click event.  The double-click time limit may vary because the user can set the double-click speed in the Control Panel.  When you're attaching procedures for these related events, be sure that their actions don't conflict.

Note   To distinguish between the left, right, and middle mouse buttons, use the MouseDown and MouseUp events.


GotFocusEvent

Occurs when an editable WinX Control object receives input focus.

Syntax

Visual Basic

Private Sub Object_GotFocusEvent([index As Integer])

Visual C++

void OnGotFocusEventObject();

Delphi

Procedure GotFocusEvent(Sender : TObject)

The GotFocusEvent event syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
index	An integer that uniquely identifies a control if it's in a control array.
Remarks

The argument Index uniquely identifies a control if it's in a control array.


KeyDown

Fired each time a key is pressed when a WinX Control object has input focus.

Syntax

Visual Basic

Private Sub Object_KeyDown([index As Integer], KeyCode As Integer, Shift As Integer)

Visual C++

void OnKeyDownObject(short KeyCode, short Shift);

Delphi

Procedure KeyDown(Sender : TObject, KeyCode : Integer, Shift : Integer)

The KeyDown event syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
index	An integer that uniquely identifies a control if it's in a control array.
KeyCode	A key code, such as vbKeyF1 (the F1 key) or vbKeyHome (the HOME key).  To specify key codes, use the constants in the object library in the Object Browser.
Shift	An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys at the time of the event. The Shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2).  These bits correspond to the values 1, 2, and 4, respectively.  Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.  For example, if both CTRL and ALT are pressed, the value of Shift is 6.
Remarks

The object with the focus receives all keystrokes. Although the KeyDown and KeyUp events can apply to most keys, they're most often used for:

•	Extended character keys such as function keys.

•	Navigation keys.

•	Combinations of keys with standard keyboard modifiers.

•	Distinguishing between the numeric keypad and regular number keys.

Use KeyDown and KeyUp event procedures if you need to respond to both the pressing and releasing of a key.

KeyDown and KeyUp aren't invoked for:

•	The ENTER key if the form has a 3D command button control with the Default property set to True.

•	The ESC key if the form has a 3D command button control with the Cancel property set to True.

•	The TAB key.

KeyDown and KeyUp interpret the uppercase and lowercase of each character by means of two arguments: KeyCode, which indicates the physical key (thus returning A and a as the same key) and Shift, which indicates the state of shift+key and therefore returns either A or a.

If you need to test for the Shift argument, you can declare constants that define the bits within the argument by using constants listed in the object library in the Object Browser.  The shift constants have the following values:

Constant	Value
vbShiftMask	1
vbCtrlMask	2
vbAltMask	4
The constants act as bit masks that you can use to test for any combination of keys.  Place the constants at the procedure level or in the Declarations section of a module and use this syntax:

Const constantname = expression

You test for a condition by first assigning each result to a temporary integer variable and then comparing Shift to a bit mask.  Use the And operator with the Shift argument to test whether the condition is greater than 0, indicating that the modifier was pressed, for example:

ShiftDown = (Shift And vbShiftMask) > 0

In a procedure, you can test for any combination of conditions, for example:

If ShiftDown And CtrlDown Then

Note   If the KeyPreview property is set to True, a form receives these events before controls on the form receive the events.  Use the KeyPreview property to create global keyboard-handling routines.


KeyPress

Fired each time a key is pressed when a WinX Control object has input focus.

Syntax

Visual Basic

Private Sub Object_KeyPress([index As Integer], KeyAscii As Integer)

Visual C++

void OnKeyPressObject(short FAR* KeyAscii);

Delphi

Procedure KeyPress(Sender : TObject, var KeyAscii: Integer)

The KeyPress event syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
index	An integer that uniquely identifies a control if it's in a control array.
KeyAscii	An integer that returns a standard numeric ANSI keycode.  The KeyAscii argument is passed by reference; changing it sends a different character to the object.  Changing KeyAscii to 0 cancels the keystroke so the object receives no character.
Remarks

The object with the focus receives the event.  A form can receive the event only if it has no visible and enabled controls or if the KeyPreview property is set to True.  A KeyPress event can involve any printable keyboard character, the CTRL key combined with a character from the standard alphabet or one of a few special characters, and the ENTER or BACKSPACE key. Changing the value of the KeyAscii argument changes the character displayed.

You can convert the KeyAscii argument into a character by using the expression:

Chr(KeyAscii)

You can then perform string operations and translate the character back to an ANSI number that the control can interpret by using the expression:

KeyAscii = Asc(char)

Use KeyDown and KeyUp event procedures to handle any keystroke not recognized by KeyPress, such as function keys, editing keys, navigation keys, and any combinations of these with keyboard modifiers.  Unlike the KeyDown and KeyUp events, KeyPress doesn't indicate the physical state of the keyboard; instead, it passes a character.

KeyPress interprets the uppercase and lowercase of each character as separate key codes and, therefore, as two separate characters.  KeyDown and KeyUp interpret the uppercase and lowercase of each character by means of two arguments: keycode, which indicates the physical key (thus returning A and a as the same key), and shift, which indicates the state of shift+key and therefore returns either A or a.

If the KeyPreview property is set to True, a form receives the event before controls on the form receive the event.  Use the KeyPreview property to create global keyboard-handling routines.

Note   The ANSI number for the keyboard combination of CTRL+@ is 0.  Because Visual Basic recognizes a KeyAscii value of 0 as a zero-length string (""), avoid using CTRL+@ in your applications.


KeyUp

Fired each time a key is released when a WinX Control object has input focus.

Syntax

Visual Basic

Private Sub Object_KeyUp([index As Integer], KeyCode As Integer, Shift As Integer)

Visual C++

void OnKeyUpObject(short KeyCode, short Shift);

Delphi

Procedure KeyUp(Sender : TObject, KeyCode : Integer, Shift : Integer)

The KeyUp event syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
index	An integer that uniquely identifies a control if it's in a control array.
KeyCode	A key code, such as vbKeyF1 (the F1 key) or vbKeyHome (the HOME key).  To specify key codes, use the constants in the object library in the Object Browser.
Shift	An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys at the time of the event. The Shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2).  These bits correspond to the values 1, 2, and 4, respectively.  Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.  For example, if both CTRL and ALT are pressed, the value of Shift is 6.
Remarks

The object with the focus receives all keystrokes. Although the KeyDown and KeyUp events can apply to most keys, they're most often used for:

•	Extended character keys such as function keys.

•	Navigation keys.

•	Combinations of keys with standard keyboard modifiers.

•	Distinguishing between the numeric keypad and regular number keys.

Use KeyDown and KeyUp event procedures if you need to respond to both the pressing and releasing of a key.

KeyDown and KeyUp aren't invoked for:

•	The ENTER key if the form has a 3D command button control with the Default property set to True.

•	The ESC key if the form has a 3D command button control with the Cancel property set to True.

•	The TAB key.

KeyDown and KeyUp interpret the uppercase and lowercase of each character by means of two arguments: KeyCode, which indicates the physical key (thus returning A and a as the same key) and Shift, which indicates the state of shift+key and therefore returns either A or a.

If you need to test for the Shift argument, you can declare constants that define the bits within the argument by using constants listed in the object library in the Object Browser.  The shift constants have the following values:

Constant	Value
vbShiftMask	1
vbCtrlMask	2
vbAltMask	4
The constants act as bit masks that you can use to test for any combination of keys.  Place the constants at the procedure level or in the Declarations section of a module and use this syntax:

Const constantname = expression

You test for a condition by first assigning each result to a temporary integer variable and then comparing Shift to a bit mask.  Use the And operator with the Shift argument to test whether the condition is greater than 0, indicating that the modifier was pressed, for example:

ShiftDown = (Shift And vbShiftMask) > 0

In a procedure, you can test for any combination of conditions, for example:

If ShiftDown And CtrlDown Then

Note   If the KeyPreview property is set to True, a form receives these events before controls on the form receive the events.  Use the KeyPreview property to create global keyboard-handling routines.


LostFocusEvent

Occurs when an editable WinX Control object loses input focus.

Syntax

Visual Basic

Private Sub Object_LostFocusEvent([index As Integer])

Visual C++

void OnLostFocusEventObject();

Delphi

Procedure LostFocusEvent(Sender : TObject)

The LostFocusEvent event syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
index	An integer that uniquely identifies a control if it's in a control array.
Remarks

The argument Index uniquely identifies a control if it's in a control array.


MouseDown

Occurs when the user presses (MouseDown) or releases (MouseUp) a mouse button over a WinX Control object.

Syntax

Visual Basic

Private Sub Object_MouseDown([index As Integer], Button As Integer, Shift As Integer, x As Single, y As Single)

Visual C++

void OnMouseDownObject(short Button, short Shift, long x, long y);

Delphi

Procedure MouseDown(Sender : TObject, Button : Integer, Shift : Integer, x : Single, y : Single)

The MouseDown event syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
index	An integer that uniquely identifies a control if it's in a control array.
Button	Returns an integer that identifies the button that was pressed (MouseDown) or released (MouseUp) to cause the event.  The Button argument is a bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2).  These bits correspond to the values 1, 2, and 4, respectively.  Only one of the bits is set, indicating the button that caused the event.
Shift	Returns an integer that corresponds to the state of the SHIFT, CTRL, and ALT keys when the button specified in the Button argument is pressed or released.  A bit is set if the key is down.  The shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2 ).  These bits correspond to the values 1, 2, and 4, respectively.  The Shift argument indicates the state of these keys.  Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.  For example, if both CTRL and ALT were pressed, the value of shift would be 6.
x, y	Returns a number that specifies the current location of the mouse pointer.  The x  and y values are always expressed in terms of the coordinate system set by the ScaleHeight, ScaleWidth, ScaleLeft, and ScaleTop properties of the object.
Remarks

Use a MouseDown or MouseUp event procedure to specify actions that will occur when a given mouse button is pressed or released.  Unlike the Click and DblClick events, MouseDown and MouseUp events enable you to distinguish between the left, right, and middle mouse buttons.  You can also write code for mouse-keyboard combinations that use the SHIFT, CTRL, and ALT keyboard modifiers.

The following applies to both Click and DblClick events:

•	If a mouse button is pressed while the pointer is over a control, that object "captures" the mouse and receives all mouse events up to and including the last MouseUp event.  This implies that the x, y mouse-pointer coordinates returned by a mouse event may not always be in the client area of the object that receives them.

•	If mouse buttons are pressed in succession, the object that captures the mouse after the first press receives all mouse events until all buttons are released.

If you need to test for the button or shift arguments, you can use constants listed in the object library in the Object Browser to define the bits within the argument:

Constant	Value	Description
vbLeftButton	1	Left button is pressed.
vbRightButton	2	Right button is pressed.
vbMiddleButton	4	Middle button is pressed.
vbShiftMask	1	Middle button is pressed.
vbCtrlMask	2	SHIFT key is pressed.
vbAltMask	4	ALT key is pressed.
The constants then act as bit masks you can use to test for any combination of buttons without having to figure out the unique bit field value for each combination.


MouseMove

Occurs when the user moves the mouse over a WinX Control object.

Syntax

Visual Basic

Private Sub Object_MouseMove([index As Integer], Button As Integer, Shift As Integer, x As Single, y As Single)

Visual C++

void OnMouseMoveObject(short Button, short Shift, long x, long y);

Delphi

Procedure MouseMove(Sender : TObject, Button : Integer, Shift : Integer, x : Single, y : Single)

The MouseMove event syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
index	An integer that uniquely identifies a control if it's in a control array.
Button	Returns an integer that identifies the button that was pressed (MouseDown) or released (MouseUp) to cause the event.  The Button argument is a bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2).  These bits correspond to the values 1, 2, and 4, respectively.  Only one of the bits is set, indicating the button that caused the event.
Shift	Returns an integer that corresponds to the state of the SHIFT, CTRL, and ALT keys when the button specified in the Button argument is pressed or released.  A bit is set if the key is down.  The shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2 ).  These bits correspond to the values 1, 2, and 4, respectively.  The Shift argument indicates the state of these keys.  Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.  For example, if both CTRL and ALT were pressed, the value of shift would be 6.
x, y	Returns a number that specifies the current location of the mouse pointer.  The x  and y values are always expressed in terms of the coordinate system set by the ScaleHeight, ScaleWidth, ScaleLeft, and ScaleTop properties of the object.
Remarks

The MouseMove event is generated continually as the mouse pointer moves across objects.  Unless another object has captured the mouse, an object recognizes a MouseMove event whenever the mouse position is within its borders.

If you need to test for the button or shift arguments, you can use constants listed in the object library in the Object Browser to define the bits within the argument:

Constant	Value	Description
vbLeftButton	1	Left button is pressed.
vbRightButton	2	Right button is pressed.
vbMiddleButton	4	Middle button is pressed.
vbShiftMask	1	Middle button is pressed.
vbCtrlMask	2	SHIFT key is pressed.
vbAltMask	4	ALT key is pressed.
The constants then act as bit masks you can use to test for any combination of buttons without having to figure out the unique bit field value for each combination.

You test for a condition by first assigning each result to a temporary integer variable and then comparing the button or shift arguments to a bit mask.  Use the And operator with each argument to test if the condition is greater than zero, indicating the key or button is pressed, as in the following code:

LeftDown = (Button And vbLeftButton) > 0

CtrlDown = (Shift And vbCtrlMask) > 0

Then, in a procedure, you can test for any combination of conditions, as follows:

If LeftDown And CtrlDown Then

Note   You can use MouseDown and MouseUp event procedures to respond to events caused by pressing and releasing mouse buttons.

The button argument for MouseMove differs from the button argument for MouseDown and MouseUp.  For MouseMove, the button argument indicates the current state of all buttons; a single MouseMove event can indicate that some, all, or no buttons are pressed.  For MouseDown and MouseUp, the button argument indicates exactly one button per event.

Any time you move a window inside a MouseMove event, it can cause a cascading event.  MouseMove events are generated when the window moves underneath the pointer.  A MouseMove event can be generated even if the mouse is perfectly stationary.


MouseUp

Occur when the user presses and releases a mouse button over a WinX Control object.

Syntax

Visual Basic

Private Sub Object_MouseUp([index As Integer], Button As Integer, Shift As Integer, x As Single, y As Single)

Visual C++

void OnMouseUpObject(short Button, short Shift, long x, long y);

Delphi

Procedure MouseUp(Sender : TObject, Button : Integer, Shift : Integer, x : Single, y : Single)

The MouseUp event syntax has these parts:

Part	Description
object	An object expression that evaluates to a WinX control.
index	An integer that uniquely identifies a control if it's in a control array.
Button	Returns an integer that identifies the button that was pressed (MouseDown) or released (MouseUp) to cause the event.  The Button argument is a bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2).  These bits correspond to the values 1, 2, and 4, respectively.  Only one of the bits is set, indicating the button that caused the event.
Shift	Returns an integer that corresponds to the state of the SHIFT, CTRL, and ALT keys when the button specified in the Button argument is pressed or released.  A bit is set if the key is down.  The shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2 ).  These bits correspond to the values 1, 2, and 4, respectively.  The Shift argument indicates the state of these keys.  Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.  For example, if both CTRL and ALT were pressed, the value of shift would be 6.
x, y	Returns a number that specifies the current location of the mouse pointer.  The x  and y values are always expressed in terms of the coordinate system set by the ScaleHeight, ScaleWidth, ScaleLeft, and ScaleTop properties of the object.
Remarks

Use a MouseDown or MouseUp event procedure to specify actions that will occur when a given mouse button is pressed or released.  Unlike the Click and DblClick events, MouseDown and MouseUp events enable you to distinguish between the left, right, and middle mouse buttons.  You can also write code for mouse-keyboard combinations that use the SHIFT, CTRL, and ALT keyboard modifiers.

The following applies to both Click and DblClick events:

•	If a mouse button is pressed while the pointer is over a control, that object "captures" the mouse and receives all mouse events up to and including the last MouseUp event.  This implies that the x, y mouse-pointer coordinates returned by a mouse event may not always be in the client area of the object that receives them.

•	If mouse buttons are pressed in succession, the object that captures the mouse after the first press receives all mouse events until all buttons are released.

If you need to test for the button or shift arguments, you can use constants listed in the object library in the Object Browser to define the bits within the argument:

Constant	Value	Description
vbLeftButton	1	Left button is pressed.
vbRightButton	2	Right button is pressed.
vbMiddleButton	4	Middle button is pressed.
vbShiftMask	1	Middle button is pressed.
vbCtrlMask	2	SHIFT key is pressed.
vbAltMask	4	ALT key is pressed.
The constants then act as bit masks you can use to test for any combination of buttons without having to figure out the unique bit field value for each combination.


A font object

This is any programmatic way of referring to a font.  In C++, it may be a C++ class or an ActiveX object.  For Visual Basic, it will always be an ActiveX object.


A string

A data type to represent strings.  For Visual Basic, it is the data type String.  For Visual C++ it is a CString object.


A long integer

A data type to represent long integers.  For Visual Basic, it is the data type Long.  For Visual C++ it is the data type long.


A constant

A numeric identifier which has a preset value.  Constants are used to convey a symbolic name to a predefined number to allow for more readible code and portability.


A short integer

A data type to represent short integers. For Visual Basic, it is the data type Integer.  For Visual C++ it is the data type int.


A Boolean

A data type to represent logical expressions.  For Visual Basic, it is the data type Boolean.  For Visual C++ it is the data type BOOL.


A color value

A data type to represent colors.  For Visual Basic, it is the data type Color, generated with the RGB command.  For Visual C++ it is a long integer value generated with the RGB macro.